From: Tahsin Erdogan <tahsin@google.com>
To: Jan Kara <jack@suse.cz>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
Jan Kara <jack@suse.com>, "Theodore Ts'o" <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Dave Kleikamp <shaggy@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Mark Fasheh <mfasheh@versity.com>,
Joel Becker <jlbec@evilplan.org>, Jens Axboe <axboe@fb.com>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Mike Christie <mchristi@redhat.com>,
Fabian Frederick <fabf@skynet.be>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
jfs-discussion@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
reiserfs-devel@vger.kernel.org
Subject: Re: [PATCH 30/31] ext4: eliminate xattr entry e_hash recalculation for removes
Date: Fri, 16 Jun 2017 19:04:44 -0700 [thread overview]
Message-ID: <CAAeU0aMuV7EHw5ZwdF52__baS36CsaB4MN03iqUdyLh1Fc6HzA@mail.gmail.com> (raw)
In-Reply-To: <20170615091026.GG1764@quack2.suse.cz>
On Thu, Jun 15, 2017 at 2:10 AM, Jan Kara <jack@suse.cz> wrote:
> I agree with moving ext4_xattr_rehash_entry() out of ext4_xattr_rehash().
> However how about just keeping ext4_xattr_rehash() in
> ext4_xattr_block_set() (so that you don't have to pass aditional argument
> to ext4_xattr_set_entry()) and calling ext4_xattr_rehash_entry() when
> i->value != NULL? That would seem easier and cleaner as well...
The is_block parameter is also used to decide whether block reserve
check should be performed:
@@ -1500,8 +1502,8 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,
* attribute block so that a long value does not occupy the
* whole space and prevent futher entries being added.
*/
- if (ext4_has_feature_ea_inode(inode->i_sb) && new_size &&
- (s->end - s->base) == i_blocksize(inode) &&
+ if (ext4_has_feature_ea_inode(inode->i_sb) &&
+ new_size && is_block &&
(min_offs + old_size - new_size) <
EXT4_XATTR_BLOCK_RESERVE(inode)) {
ret = -ENOSPC;
Because of that, I think moving ext4_xattr_rehash to caller makes it
bit more complicated. Let me know if you disagree.
next prev parent reply other threads:[~2017-06-17 2:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 17:23 [PATCH 30/31] ext4: eliminate xattr entry e_hash recalculation for removes Tahsin Erdogan
2017-06-15 9:10 ` Jan Kara
2017-06-17 2:04 ` Tahsin Erdogan [this message]
2017-06-19 8:10 ` Jan Kara
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=CAAeU0aMuV7EHw5ZwdF52__baS36CsaB4MN03iqUdyLh1Fc6HzA@mail.gmail.com \
--to=tahsin@google.com \
--cc=adilger.kernel@dilger.ca \
--cc=axboe@fb.com \
--cc=darrick.wong@oracle.com \
--cc=deepa.kernel@gmail.com \
--cc=fabf@skynet.be \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=jlbec@evilplan.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=mfasheh@versity.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=shaggy@kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).