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; + u64

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 chan...@linux.vnet.ibm.com 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

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 12:09 PM, Christoph Hellwig h...@infradead.org 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).

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 fsdevel):

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

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 c...@fb.com 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 [1],

[PATCH] Btrfs: implement inode_operations callback tmpfile

2014-04-01 Thread Filipe David Borba Manana
This implements the tmpfile callback of struct inode_operations, introduced in the linux kernel 3.11 [1], and implemented already by some filesystems. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- fs/btrfs/inode.c | 120 +-- 1