Skip to content

e2fsprogs: Using discard in e2fsprogs tools

Lukas Czerner linux-ext4 2 versions – Applied

Status from this message: Applied to the maint branch, so it will git e2fsprogs 1.41.13.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 7 repliesApplied
  2. v17 patches 13 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6e2fsprogs: Add discard function into struct_io_managerlib/ext2fs/ext2_io.h lib/ext2fs/unix_io.c+33 -02 replies
2/6e2fsprogs: Add CHANNEL_FLAGS_DISCARD_ZEROES flag for io_managerlib/ext2fs/ext2_io.h lib/ext2fs/unix_io.c misc/mke2fs.c+16 -121 reply
3/6e2fsck: Discard free data and inode blocks.e2fsck/e2fsck.8.in e2fsck/e2fsck.h e2fsck/pass5.c +1 more+120 -01 reply
4/6mke2fs: Deprecate -K option, introduce discard/nodiscardmisc/mke2fs.8.in misc/mke2fs.c+22 -81 reply
5/6mke2fs: Use unix_discard() for discardsmisc/mke2fs.c+11 -431 reply
6/6mke2fs: Add discard option into mke2fs.confmisc/mke2fs.c misc/mke2fs.conf.5.in+10 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/6 v2] e2fsprogs: Using discard in e2fsprogs tools

Hi all,

We have came to consensus about using discard in e2fsprogs tools. These patches generalize use of discard in e2fsprogs tools introduce changes in mke2fs and e2fsck.

Short summary
-------------

[PATCH 1/6] e2fsprogs: Add discard function into struct_io_manager
* generalize use of discard in e2fsprogs and let any tool in e2fsprogs take advantage of it withou need to write its own BLKDISCARD wrappers.

[PATCH 2/6] e2fsprogs: Add CHANNEL_FLAGS_DISCARD_ZEROES flag for io_manager
* Give the opportunity for any io_manager to check if device discard support zeroes data and save the results into io_channel for use in any e2fsprofs tool.

[PATCH 3/6] e2fsck: Discard free data and inode blocks.
* In pass 5 after the group descriptors has been changed discard free data and inode blocks. The consensus was that it should be OFF by default, so it is.
* Introduce new paid of extended options discard/nodiscard.

[PATCH 4/6] mke2fs: Deprecate -K option, introduce discard/nodiscard
* To the same of consistency and to gain ability to easily default it the new pair of extended options has been added.
* The consensus was that it should stay ON by default, so it is.

[PATCH 5/6] mke2fs: Use unix_discard() for discards

[PATCH 6/6] mke2fs: Add discard option into mke2fs.conf

Any comments appreciated!

Thanks!

-Lukas

---
[PATCH 1/6] e2fsprogs: Add discard function into struct_io_manager [PATCH 2/6] e2fsprogs: Add CHANNEL_FLAGS_DISCARD_ZEROES flag for io_manager [PATCH 3/6] e2fsck: Discard free data and inode blocks.
[PATCH 4/6] mke2fs: Deprecate -K option, introduce discard/nodiscard [PATCH 5/6] mke2fs: Use unix_discard() for discards
[PATCH 6/6] mke2fs: Add discard option into mke2fs.conf

 e2fsck/e2fsck.8.in    |   14 +++++++
 e2fsck/e2fsck.h       |    1 +
 e2fsck/pass5.c        |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 e2fsck/unix.c         |   10 ++++-
 lib/ext2fs/ext2_io.h  |    5 ++
 lib/ext2fs/unix_io.c  |   45 ++++++++++++++++++++++-
 misc/mke2fs.8.in      |   18 +++++---
 misc/mke2fs.c         |   98 ++++++++++++++-----------------------------------
 misc/mke2fs.conf.5.in |    5 ++
 9 files changed, 213 insertions(+), 79 deletions(-)