All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: Filipe David Borba Manana <fdmanana@gmail.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: fix incorrect inode acl reset
Date: Tue, 15 Oct 2013 14:00:17 -0400	[thread overview]
Message-ID: <20131015180017.GC14323@localhost.localdomain> (raw)
In-Reply-To: <1381859040-11211-1-git-send-email-fdmanana@gmail.com>

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,

Josef

  reply	other threads:[~2013-10-15 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 17:44 [PATCH] Btrfs: fix incorrect inode acl reset Filipe David Borba Manana
2013-10-15 18:00 ` Josef Bacik [this message]
2013-10-15 18:02   ` Filipe David Manana
2013-10-15 21:58     ` David Sterba
2013-10-16 14:06       ` Filipe David Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131015180017.GC14323@localhost.localdomain \
    --to=jbacik@fusionio.com \
    --cc=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.