Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-16 Thread Christoph Hellwig
On Wed, Apr 16, 2014 at 12:25:07PM +0100, Filipe David Manana wrote: > Interesting Christoph. > I was following the ext4 implementation initially. > > So it seems the question is still open, and none of the following > alternatives is decided yet (unless I missed something in the thread > at fsdev

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-16 Thread Filipe David Manana
On Wed, Apr 16, 2014 at 12:09 PM, Christoph Hellwig wrote: > On Wed, Apr 16, 2014 at 11:36:23AM +0100, Filipe David Manana wrote: >> The xattr is needed for the case where an acl is inherited. And 5 >> units are required for orphan insertion (see comment on top of >> btrfs_orphan_add). >> I'll upd

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-16 Thread Christoph Hellwig
On Wed, Apr 16, 2014 at 11:36:23AM +0100, Filipe David Manana wrote: > The xattr is needed for the case where an acl is inherited. And 5 > units are required for orphan insertion (see comment on top of > btrfs_orphan_add). > I'll update the comment. I don't think think a tmpfile should inherit any

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-16 Thread Filipe David Manana
On Wed, Apr 16, 2014 at 10:00 AM, Chandan Rajendra wrote: > On Tuesday 01 Apr 2014 11:53:19 PM Filipe David Borba Manana wrote: >> +static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t >> mode) >> +{ >> + struct btrfs_trans_handle *trans; >> + struct btrfs_root *root

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-16 Thread Chandan Rajendra
On Tuesday 01 Apr 2014 11:53:19 PM Filipe David Borba Manana wrote: > +static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t > mode) > +{ > + struct btrfs_trans_handle *trans; > + struct btrfs_root *root = BTRFS_I(dir)->root; > + struct inode *inode = NULL; > +

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-04 Thread Filipe David Manana
On Fri, Apr 4, 2014 at 3:12 PM, Chris Mason wrote: > > > On 04/04/2014 09:59 AM, David Sterba wrote: >> >> On Tue, Apr 01, 2014 at 11:53:19PM +0100, Filipe David Borba Manana wrote: >>> >>> This implements the tmpfile callback of struct inode_operations, >>> introduced >>> in the linux kernel 3.11

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-04 Thread Chris Mason
On 04/04/2014 09:59 AM, David Sterba wrote: On Tue, Apr 01, 2014 at 11:53:19PM +0100, Filipe David Borba Manana wrote: This implements the tmpfile callback of struct inode_operations, introduced in the linux kernel 3.11 [1], and implemented already by some filesystems. Nice! Btw, would be g

Re: [PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-04 Thread David Sterba
On Tue, Apr 01, 2014 at 11:53:19PM +0100, Filipe David Borba Manana wrote: > This implements the tmpfile callback of struct inode_operations, introduced > in the linux kernel 3.11 [1], and implemented already by some filesystems. Nice! Btw, would be good to mention 'O_TMPFILE' at lest in the chan