Btrfs v0.15 released
Hello everyone,
Btrfs v0.15 is now available for download. The major feature added over v0.14 is the ability to remove devices online, and improved handling of IO failures during reads and writes. v0.15 does not include any disk format changes over v0.14.
You can find btrfs download information and documentation at:
Another highlight is the clone file data ioctl from Sage Weil, which can be used to make a COW copy of a single file. btrfs-progs includes a new command called bcp which can be used to run COW copies on single files or directory trees.
Summary of fixes since v0.14
* 2.6.26-rc compile fixes (Mingming Cao)
* Fixes for IO stalls and high CPU usage during huge streaming writes (thanks to Eric Whitney for testing these on 14TB files)
* Online device removal and degraded mounts
* Fixes to the online extent relocation and balancing code
* Deal with devices disappearing after initial btrfsctl -a scan
* Transparently correct IO errors on raid1 and raid10 by using the other mirror.
* Detect misplaced btree writes by checking generation numbers during reads
* Fix nodatacow to more accurately detect snapshots
* Compile fixes for Apparmor kernels (Jeff Mahoney)
* Clone file data ioctl (Sage Weil)
* Fixes and optimizations for 2.6.18 enterprise kernels
-chris
'cp -p' leaves mode on destination files/dirs incorrect
Hi all, this is a problem observed in btrfs-0.15:
Using 'cp -p', 'cp -a', or moving files to btrfs from another filesystem (which does a copy then remove) will leave the copied files with the wrong mode. Specifically, all permissions for 'group' or 'other' are nulled out. My umask is the typical 0022, but umask should not matter here anyway (to make sure I wasn't crazy, I tried it on an ext3 partition).
The simplest example is:
touch bar
cp -p bar foo
Doing 'ls -l bar foo' yields:
-rw-r--r-- 1 joe skyrush 0 Jun 2 17:38 bar
-rw------- 1 joe skyrush 0 Jun 2 17:38 foo
For directories, if they used to have mode 755, the copies will then have mode 700.
I first noticed this when moving dirs from another partition, but 'cp -a', of course, demonstrated it as well.
I do not know the btrfs code well yet, but I am willing to help investigate this, especially of someone points me to the right place to start looking. :)
-Thanks, Joe
Re: 'cp -p' leaves mode on destination files/dirs incorrect
2008/6/3 Joe Peterson <[email protected]>:
Quoted 7 lines
Hi all, this is a problem observed in btrfs-0.15:
Using 'cp -p', 'cp -a', or moving files to btrfs from another filesystem (which does a copy then remove) will leave the copied files with the wrong mode. Specifically, all permissions for 'group' or 'other' are nulled out. My umask is the typical 0022, but umask should not matter here anyway (to make sure I wasn't crazy, I tried it on an ext3 partition).
Hello,
This is a known bug. The attached patch can temporarily fix it.
Regards
YZ
---
xattr.c +6 -6
@@ -29,22 +29,22 @@ static struct xattr_handler *btrfs_xattrstatic struct xattr_handler *btrfs_xattr_handler_map[] = { [BTRFS_XATTR_INDEX_USER ] = &btrfs_xattr_user_handler, #ifdef CONFIG_FS_POSIX_ACL - [BTRFS_XATTR_INDEX_POSIX_ACL_ACCESS ] = &btrfs_xattr_acl_access_handler, - [BTRFS_XATTR_INDEX_POSIX_ACL_DEFAULT ] = &btrfs_xattr_acl_default_handler, +// [BTRFS_XATTR_INDEX_POSIX_ACL_ACCESS] = &btrfs_xattr_acl_access_handler, +// [BTRFS_XATTR_INDEX_POSIX_ACL_DEFAULT] = &btrfs_xattr_acl_default_handler, #endif [BTRFS_XATTR_INDEX_TRUSTED ] = &btrfs_xattr_trusted_handler, [BTRFS_XATTR_INDEX_SECURITY ] = &btrfs_xattr_security_handler, - [BTRFS_XATTR_INDEX_SYSTEM ] = &btrfs_xattr_system_handler, +// [BTRFS_XATTR_INDEX_SYSTEM] = &btrfs_xattr_system_handler, };struct xattr_handler *btrfs_xattr_handlers[] = { &btrfs_xattr_user_handler, #ifdef CONFIG_FS_POSIX_ACL - &btrfs_xattr_acl_access_handler, - &btrfs_xattr_acl_default_handler, +// &btrfs_xattr_acl_access_handler, +// &btrfs_xattr_acl_default_handler, #endif &btrfs_xattr_trusted_handler, &btrfs_xattr_security_handler, - &btrfs_xattr_system_handler, +// &btrfs_xattr_system_handler, NULL , };