[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeU0aMuV7EHw5ZwdF52__baS36CsaB4MN03iqUdyLh1Fc6HzA@mail.gmail.com>
Date: Fri, 16 Jun 2017 19:04:44 -0700
From: Tahsin Erdogan <tahsin@...gle.com>
To: Jan Kara <jack@...e.cz>
Cc: "Darrick J . Wong" <darrick.wong@...cle.com>,
Jan Kara <jack@...e.com>, "Theodore Ts'o" <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Dave Kleikamp <shaggy@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Mark Fasheh <mfasheh@...sity.com>,
Joel Becker <jlbec@...lplan.org>, Jens Axboe <axboe@...com>,
Deepa Dinamani <deepa.kernel@...il.com>,
Mike Christie <mchristi@...hat.com>,
Fabian Frederick <fabf@...net.be>, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, jfs-discussion@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, ocfs2-devel@....oracle.com,
reiserfs-devel@...r.kernel.org
Subject: Re: [PATCH 30/31] ext4: eliminate xattr entry e_hash recalculation
for removes
On Thu, Jun 15, 2017 at 2:10 AM, Jan Kara <jack@...e.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.
Powered by blists - more mailing lists