From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: linux-btrfs@vger.kernel.org
Cc: Filipe David Borba Manana <fdmanana@gmail.com>,
linuxpatches@star.c10r.facebook.com
Subject: Re: [PATCH] Btrfs: implement inode_operations callback tmpfile
Date: Wed, 16 Apr 2014 15:30:51 +0630 [thread overview]
Message-ID: <1468801.p0fTO3mgjp@localhost.localdomain> (raw)
In-Reply-To: <1396392799-9858-1-git-send-email-fdmanana@gmail.com>
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 objectid;
> + u64 index;
> + int ret = 0;
> +
> + /*
> + * 2 for inode item and ref
> + * 2 for dir items
> + * 1 for xattr if selinux is on
> + */
> + trans = btrfs_start_transaction(root, 5);
> + if (IS_ERR(trans))
> + return PTR_ERR(trans);
> +
Hello,
Any particular reason to reserve space for 5 items? For the O_TMPFILE
case we seem to allocate and use just the one inode item and none of
the associated 'inode ref', 'dir item' and 'dir index item' since
there is no directory entry associated with the file. I am not
sure about the xattr item though.
Thanks,
chandan.
next prev parent reply other threads:[~2014-04-16 10:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 22:53 [PATCH] Btrfs: implement inode_operations callback tmpfile Filipe David Borba Manana
2014-04-04 13:59 ` David Sterba
2014-04-04 14:12 ` Chris Mason
2014-04-04 14:16 ` Filipe David Manana
2014-04-16 9:00 ` Chandan Rajendra [this message]
2014-04-16 10:36 ` Filipe David Manana
2014-04-16 11:09 ` Christoph Hellwig
2014-04-16 11:25 ` Filipe David Manana
2014-04-16 11:27 ` Christoph Hellwig
2014-04-27 19:40 ` [PATCH v2] " Filipe David Borba 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=1468801.p0fTO3mgjp@localhost.localdomain \
--to=chandan@linux.vnet.ibm.com \
--cc=fdmanana@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linuxpatches@star.c10r.facebook.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).