From: Lukas Czerner <lczerner@redhat.com>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Lukas Czerner <lczerner@redhat.com>,
eshishki@redhat.com, jmoyer@redhat.com, rwheeler@redhat.com,
linux-ext4@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH 2/2] Add batched discard support for ext4
Date: Wed, 14 Jul 2010 13:43:30 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1007141340070.2980@localhost> (raw)
In-Reply-To: <87lj9e7547.fsf@dmon-lap.sw.ru>
On Wed, 14 Jul 2010, Dmitry Monakhov wrote:
> Lukas Czerner <lczerner@redhat.com> writes:
>
> > On Wed, 14 Jul 2010, Dmitry Monakhov wrote:
> >
> >> Lukas Czerner <lczerner@redhat.com> writes:
> >>
> >> > Walk through each allocation group and trim all free extents. It can be
> >> > invoked through TRIM ioctl on the file system. The main idea is to
> >> > provide a way to trim the whole file system if needed, since some SSD's
> >> > may suffer from performance loss after the whole device was filled (it
> >> > does not mean that fs is full!).
> >> >
> >> > It search fro free extents in each allocation group. When the free
> >> > extent is found, blocks are marked as used and then trimmed. Afterwards
> >> > these blocks are marked as free in per-group bitmap.
> >> Looks ok, except two small notes:
> >> 1) trim_fs is a time consuming operation and we have to add
> >> condresced, and signal_pending checks to allow user to interrupt
> >> cmd if necessery. See patch attached.
> >
> > Hi, Dimitry
> >
> > thanks for your patch! Although I have one question:
> >
> >
> > for (group = 0; group < ngroups; group++) {
> > - int err;
> > -
> > - err = ext4_mb_load_buddy(sb, group, &e4b);
> > - if (err) {
> > + ret = ext4_mb_load_buddy(sb, group, &e4b);
> > + if (ret) {
> > ext4_error(sb, "Error in loading buddy "
> > "information for %u", group);
> > - continue;
> > + break;
> > }
> >
> > Is there really need to jump out from the loop and exit in the case of
> > load_buddy failure ? Next group may very well succeed in loading buddy,
> > or am I missing something ?
> Well, it may fail due to -ENOMEM which is not scary but in some places
> it may fail due to EIO which is a very bad sign. So i think it is
> slightly dangerous to continue if we have found a same group.
Ok, it seems reasonable.
> >
> >> 2) IMHO runtime trim support is useful sometimes, for example when
> >> user really care about data security i.e. unlinked file should be
> >> trimmed ASAP. I think we have to provide 'secdel' mount option
> >> similar to secdeletion flag for inode, but this is another story
> >> not directly connected with the patch.
> >
> > I like the idea, but IMO this should work for any underlying storage,
> > not just for SSDs.
> Off course. We may use blkdev_issue_zeroout() if disk does not support
> discard with zeroing.
> >
-Lukas
next prev parent reply other threads:[~2010-07-14 11:43 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 7:53 Ext4: batched discard support - simplified version Lukas Czerner
2010-07-07 7:53 ` [PATCH 1/2] Add ioctl FITRIM Lukas Czerner
2010-07-07 7:53 ` [PATCH 2/2] Add batched discard support for ext4 Lukas Czerner
2010-07-14 8:33 ` Dmitry Monakhov
2010-07-14 9:40 ` Lukas Czerner
2010-07-14 10:03 ` Dmitry Monakhov
2010-07-14 11:43 ` Lukas Czerner [this message]
2010-07-23 14:36 ` Ext4: batched discard support - simplified version Ted Ts'o
2010-07-23 15:13 ` Jeff Moyer
2010-07-23 15:19 ` Ted Ts'o
2010-07-23 15:40 ` Jeff Moyer
2010-07-23 17:00 ` Ted Ts'o
2010-07-24 16:31 ` Ric Wheeler
2010-07-23 15:30 ` Greg Freemyer
2010-07-26 10:30 ` Lukas Czerner
-- strict thread matches above, loose matches on Subject: below --
2010-04-19 10:55 Ext4: batched discard support Lukas Czerner
2010-04-19 10:55 ` [PATCH 1/2] Add ioctl FITRIM Lukas Czerner
2010-04-19 10:55 ` [PATCH 2/2] Add batched discard support for ext4 Lukas Czerner
2010-04-20 21:21 ` Greg Freemyer
2010-04-21 2:26 ` Mark Lord
2010-04-21 2:45 ` Eric Sandeen
2010-04-21 18:59 ` Greg Freemyer
2010-04-21 19:04 ` Ric Wheeler
2010-04-21 19:22 ` Jeff Moyer
2010-04-21 20:44 ` Greg Freemyer
2010-04-21 20:53 ` Greg Freemyer
2010-04-21 21:01 ` Eric Sandeen
2010-04-21 21:03 ` Ric Wheeler
2010-04-21 21:47 ` Greg Freemyer
2010-04-21 21:56 ` James Bottomley
2010-04-21 21:59 ` Mark Lord
2010-04-23 8:23 ` Lukas Czerner
2010-04-24 13:24 ` Greg Freemyer
2010-04-24 13:48 ` Ric Wheeler
2010-04-24 14:30 ` Greg Freemyer
2010-04-24 14:43 ` Eric Sandeen
2010-04-24 15:03 ` Greg Freemyer
2010-04-24 17:04 ` Ric Wheeler
2010-04-24 18:30 ` Greg Freemyer
2010-04-24 18:41 ` Ric Wheeler
2010-04-26 14:00 ` Mark Lord
2010-04-26 14:42 ` Martin K. Petersen
2010-04-26 15:27 ` Greg Freemyer
2010-04-26 15:51 ` Lukas Czerner
2010-04-28 1:25 ` Mark Lord
2010-04-26 15:48 ` Ric Wheeler
2010-04-24 19:06 ` Martin K. Petersen
2010-04-26 14:03 ` Mark Lord
2010-04-24 18:39 ` Martin K. Petersen
2010-04-26 16:55 ` Jan Kara
2010-04-26 17:46 ` Lukas Czerner
2010-04-26 17:52 ` Ric Wheeler
2010-04-26 18:14 ` Lukas Czerner
2010-04-26 18:28 ` Jeff Moyer
2010-04-21 20:52 ` Greg Freemyer
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=alpine.LFD.2.00.1007141340070.2980@localhost \
--to=lczerner@redhat.com \
--cc=dmonakhov@openvz.org \
--cc=eshishki@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.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 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.