linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3 v3] Batched discard support for Ext3/Ext4
@ 2010-07-27 12:41 Lukas Czerner
  2010-07-27 12:41 ` [PATCH 1/3] Add ioctl FITRIM Lukas Czerner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lukas Czerner @ 2010-07-27 12:41 UTC (permalink / raw)
  To: linux-ext4; +Cc: jmoyer, rwheeler, eshishki, sandeen, jack, tytso

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-28  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27 12:41 [PATCH 0/3 v3] Batched discard support for Ext3/Ext4 Lukas Czerner
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

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).