From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Zach Brown <zab@zabbo.net>
Cc: Ric Wheeler <rwheeler@redhat.com>, Jan Kara <jack@suse.cz>,
Eric Sandeen <sandeen@redhat.com>, Theodore Ts'o <tytso@mit.edu>,
Fredrick <fjohnber@zoho.com>,
linux-ext4@vger.kernel.org, Andreas Dilger <adilger@dilger.ca>,
wenqing.lz@taobao.com
Subject: Re: ext4_fallocate
Date: Wed, 4 Jul 2012 10:23:17 +0800 [thread overview]
Message-ID: <20120704022317.GA16947@gmail.com> (raw)
In-Reply-To: <4FF3328F.3090301@zabbo.net>
Hi Zach,
Thanks for reviewing this patch.
On Tue, Jul 03, 2012 at 10:57:35AM -0700, Zach Brown wrote:
>
> >workload frequently does a uninitialized extent conversion. Thus, now
> >we set it to 256 (1MB chunk), and put it into super block in order to
> >adjust it dynamically in sysfs.
>
> It's a bit of a tangent, but this caught my eye.
Oh, actually now the default value is set to 1MB in this patch. But I
think maybe other users want to change this value. So I add an interface
in sysfs to adjust dynaimically. Certainly it is convenient for me to do
the above tests. :-)
>
> >+ /* If extent has less than 2*s_extent_zeroout_len zerout directly */
> >+ if (ee_len<= 2*sbi->s_extent_zeroout_len&&
> > (EXT4_EXT_MAY_ZEROOUT& split_flag)) {
>
> >- if (allocated<= EXT4_EXT_ZERO_LEN&&
> >+ if (allocated<= sbi->s_extent_zeroout_len&&
> > (EXT4_EXT_MAY_ZEROOUT& split_flag)) {
>
> > } else if ((map->m_lblk - ee_block + map->m_len<
> >- EXT4_EXT_ZERO_LEN)&&
> >+ sbi->s_extent_zeroout_len)&&
>
> I'd be worried about having to verify that nothing bad happened if these
> sbi s_extent_zeroout_len references could see different values if they
> raced with a sysfs update. Can they do that?
>
> Maybe avoid the risk all together and have an on-stack copy that's only
> referenced once at the start?
I don't think 's_extent_zeroout_len' is updated frequently by user, but
using an on-stack copy quite can avoid the risk. I will fix it if most
of all think that this patch is useful and can be applied.
Regards,
Zheng
next prev parent reply other threads:[~2012-07-04 2:15 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 6:42 ext4_fallocate Fredrick
2012-06-25 7:33 ` ext4_fallocate Andreas Dilger
2012-06-28 15:12 ` ext4_fallocate Phillip Susi
2012-06-28 15:23 ` ext4_fallocate Eric Sandeen
2012-06-25 8:51 ` ext4_fallocate Zheng Liu
2012-06-25 19:04 ` ext4_fallocate Fredrick
2012-06-25 19:17 ` ext4_fallocate Theodore Ts'o
2012-06-26 1:23 ` ext4_fallocate Fredrick
2012-06-26 13:13 ` ext4_fallocate Ric Wheeler
2012-06-26 17:30 ` ext4_fallocate Theodore Ts'o
2012-06-26 18:06 ` ext4_fallocate Fredrick
2012-06-26 18:21 ` ext4_fallocate Ric Wheeler
2012-06-26 18:57 ` ext4_fallocate Ted Ts'o
2012-06-26 19:22 ` ext4_fallocate Ric Wheeler
2012-06-26 18:05 ` ext4_fallocate Fredrick
2012-06-26 18:59 ` ext4_fallocate Ted Ts'o
2012-06-26 19:30 ` ext4_fallocate Ric Wheeler
2012-06-26 19:57 ` ext4_fallocate Eric Sandeen
2012-06-26 20:44 ` ext4_fallocate Eric Sandeen
2012-06-27 15:14 ` ext4_fallocate Eric Sandeen
2012-06-27 19:30 ` ext4_fallocate Theodore Ts'o
2012-06-27 23:02 ` ext4_fallocate Eric Sandeen
2012-06-28 11:27 ` ext4_fallocate Ric Wheeler
2012-06-29 19:02 ` ext4_fallocate Andreas Dilger
2012-07-02 3:03 ` ext4_fallocate Zheng Liu
2012-06-28 12:48 ` ext4_fallocate Theodore Ts'o
2012-07-02 3:16 ` ext4_fallocate Zheng Liu
2012-07-02 16:33 ` ext4_fallocate Eric Sandeen
2012-07-02 17:44 ` ext4_fallocate Jan Kara
2012-07-02 17:48 ` ext4_fallocate Ric Wheeler
2012-07-03 17:41 ` ext4_fallocate Zheng Liu
2012-07-03 17:57 ` ext4_fallocate Zach Brown
2012-07-04 2:23 ` Zheng Liu [this message]
2012-07-02 18:01 ` ext4_fallocate Theodore Ts'o
2012-07-03 9:30 ` ext4_fallocate Jan Kara
2012-07-04 1:15 ` ext4_fallocate Phillip Susi
2012-07-04 2:36 ` ext4_fallocate Zheng Liu
2012-07-04 3:06 ` ext4_fallocate Phillip Susi
2012-07-04 3:48 ` ext4_fallocate Zheng Liu
2012-07-04 12:20 ` ext4_fallocate Ric Wheeler
2012-07-04 13:25 ` ext4_fallocate Zheng Liu
2012-06-26 13:06 ` ext4_fallocate Eric Sandeen
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=20120704022317.GA16947@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=adilger@dilger.ca \
--cc=fjohnber@zoho.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.com \
--cc=zab@zabbo.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.