Re: [PATCH] Btrfs: fix incorrect inode acl reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2013 at 7:00 PM, Josef Bacik <jbacik@xxxxxxxxxxxx> wrote:
> On Tue, Oct 15, 2013 at 06:44:00PM +0100, Filipe David Borba Manana wrote:
>> When a directory has a default ACL and a subdirectory is created
>> under that directory, btrfs_init_acl() is called when the
>> subdirectory's inode is created to initialize the inode's ACL
>> (inherited from the parent directory) but it was clearing the ACL
>> from the inode after setting it if posix_acl_create() returned
>> success, instead of clearing it only if it returned an error.
>>
>> To reproduce this issue:
>>
>> $ mkfs.btrfs -f /dev/loop0
>> $ mount /dev/loop0 /mnt
>> $ mkdir /mnt/acl
>> $ setfacl -d --set u::rwx,g::rwx,o::- /mnt/acl
>> $ getfacl /mnt/acl
>> user::rwx
>> group::rwx
>> other::r-x
>> default:user::rwx
>> default:group::rwx
>> default:other::---
>>
>> $ mkdir /mnt/acl/dir1
>> $ getfacl /mnt/acl/dir1
>> user::rwx
>> group::rwx
>> other::---
>>
>> After unmounting and mounting again the filesystem, fgetacl returned the
>> expected ACL:
>>
>> $ umount /mnt/acl
>> $ mount /dev/loop0 /mnt
>> $ getfacl /mnt/acl/dir1
>> user::rwx
>> group::rwx
>> other::---
>> default:user::rwx
>> default:group::rwx
>> default:other::---
>>
>> Meaning that the underlying xattr was persisted.
>>
>
> Can you put this into an xfstest please?  Thanks,

A new one or just add it to an existing one (and which)?


>
> Josef



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux