From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: jmoyer@redhat.com, rwheeler@redhat.com, eshishki@redhat.com,
sandeen@redhat.com, jack@suse.cz, tytso@mit.edu
Subject: [PATCH 0/3 v3] Batched discard support for Ext3/Ext4
Date: Tue, 27 Jul 2010 14:41:51 +0200 [thread overview]
Message-ID: <1280234514-10287-1-git-send-email-lczerner@redhat.com> (raw)
Hi all,
since my last post I have changed those patches slightly. Ext3 patch does
not introduce DISCARD/NODISCARD mount option, so there is just FITRIM
ioctl which can be invoked only by user with CAP_SYS_ADMIN.
Ext3 patch also involves journaling because as Jan pointed out not using
journal can cause problems when system crashes. Jan please look at this
I hope it is ok now. Also I am not sure if it would not be better to close
the journal after allocating free space and then start new one after
the TRIM (this was proposed by Josef Bacik).
Ext4 patch does not remove old "online" discard implementation and does not
check for DISCARD mount option. To avoid journaling I have used alloc_sem
semaphore to prevent allocations from the group while it is being trimmed.
It seems sufficient to me.
The general idea of batched discards stays the same. So when FITRIM ioctl
is invoked upon the mount point, it walks through all allocation groups
searching for free extents bigger than minlen, then trim those extents. In
ext3 consistency is assured by allocating these free extents in alloc. group
(with journal involved). In ext4 consistency is assured by use of alloc_sem
semaphore.
-Lukas
[PATCH 1/3] Add ioctl FITRIM.
[PATCH 2/3] Add batched discard support for ext3
[PATCH 3/3] Add batched discard support for ext4
next reply other threads:[~2010-07-27 12:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 12:41 Lukas Czerner [this message]
2010-07-27 12:41 ` [PATCH 1/3] Add ioctl FITRIM Lukas Czerner
2010-07-27 12:41 ` [PATCH 2/3] Add batched discard support for ext3 Lukas Czerner
2010-07-27 15:43 ` Jan Kara
2010-07-28 9:13 ` Lukas Czerner
2010-07-27 12:41 ` [PATCH 3/3] Add batched discard support for ext4 Lukas Czerner
2010-07-27 16:28 ` 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=1280234514-10287-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=eshishki@redhat.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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).