linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8 v3] ext4: extent status tree (step 1)
@ 2012-10-26 13:23 Zheng Liu
  2012-10-26 13:23 ` [PATCH 1/8 v3] ext4: add two structures supporting extent status tree Zheng Liu
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Zheng Liu @ 2012-10-26 13:23 UTC (permalink / raw)
  To: linux-ext4, jeff.liu
  Cc: tytso, hughd, xiaoqiangnk, achender, lczerner, Zheng Liu

Hi all,

Here is the v3 of extent status tree.  In this version, the biggest change is
the i_es_lock (a rwlock_t) instead of i_data_sem, which is introduced to protect
extent status tree.  Moreover I improve the SEEK_DATA/SEEK_HOLE.  In previous
version, the unwritten extent is as a data, and now it will lookup page cache to
determine it as a data or a hole.  When it has some data at the given range, the
unwritten extent will be as a data.  Otherwise, it will be as a hole.  Other
changes contain some bug fixes.

About introduction of extent status tree and future works in step2, please see
the comments in patch 2.

Here is a defect after introducing SEEK_DATA/SEEK_HOLE support, which will cause
xfstest #285 failure when the file is block-mapped because in ext4 fallocate(2)
is not supported by block-mapped file.  However, in current version of xfstest,
it cannot trigger any failure because in xfstest the test case has a bug that
will cause no error is reported from #285.  I have submitted a patch to fix it,
but it still doesn't be applied.  Thus, if someone are willing to test
SEEK_DATA/SEEK_HOLE patch, please apply this patch firstly [1].

1. http://patchwork.xfs.org/patch/4276/

I really thanks Jeff Liu, who gives me some advices and inspires me about
SEEK_DATA/SEEK_HOLE improvement, and the function, which looks up page cache to
determine whether an unwritten extent is as a data or a hole, is inspired by
his work for xfs (d126d43f631f996daeee5006714fed914be32368).  Thus, I add a
Signed-off-by for his crediting.

Jeff, I really appreicate if you could allow me to add Signed-off-by in patch 8.
If doing like this is incorrect, please let me know.  Thanks!

v3 <- v2:
 - add rwlock to protect extent status tree
 - improve SEEK_DATA/SEEK_HOLE
 - fix some bugs

Here is the second version:
http://lwn.net/Articles/512899/ 

v2 <- v1:
 - add a BUG_ON to do a sanity check in extent_status_end
 - fix off-by-one problem in extent_status_end accroding to Lukas's comment
 - add more detailed comments in ext4_es_find_extent
 - try to lookup in extent tree cache firstly in ext4_es_find_extent
 - rename ext4_es_add_space to ext4_es_insert_extent
 - rename ext4_es_remove_space to ext4_es_remove_extent

The first version is in this link:
http://www.spinics.net/lists/linux-ext4/msg33101.html

Any feedbacks are appreciated.  Thanks!

Regards,
Zheng
---
Zheng Liu (8):
      ext4: add two structures supporting extent status tree
      ext4: add operations on extent status tree
      ext4: initialize extent status tree
      ext4: let ext4 maintain extent status tree
      ext4: add some tracepoints in extent status tree
      ext4: reimplement ext4_find_delay_alloc_range on extent status tree
      ext4: reimplement fiemap on extent status tree
      ext4: introduce lseek SEEK_DATA/SEEK_HOLE support

 fs/ext4/Makefile            |   2 +-
 fs/ext4/ext4.h              |  10 +-
 fs/ext4/ext4_extents.h      |   3 +-
 fs/ext4/extents.c           | 305 +++++-----------------------------
 fs/ext4/extents_status.c    | 499 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/extents_status.h    |  45 +++++
 fs/ext4/file.c              | 334 ++++++++++++++++++++++++++++++++++++-
 fs/ext4/indirect.c          |   1 +
 fs/ext4/inode.c             |  91 ++++------
 fs/ext4/super.c             |  14 +-
 include/trace/events/ext4.h | 101 +++++++++++
 11 files changed, 1078 insertions(+), 327 deletions(-)

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

end of thread, other threads:[~2012-11-19  5:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 13:23 [PATCH 0/8 v3] ext4: extent status tree (step 1) Zheng Liu
2012-10-26 13:23 ` [PATCH 1/8 v3] ext4: add two structures supporting extent status tree Zheng Liu
2012-10-26 13:23 ` [PATCH 2/8 v3] ext4: add operations on " Zheng Liu
2012-11-08 23:21   ` Theodore Ts'o
2012-11-09  2:22     ` Zheng Liu
2012-10-26 13:23 ` [PATCH 3/8 v3] ext4: initialize " Zheng Liu
2012-10-26 13:23 ` [PATCH 4/8 v3] ext4: let ext4 maintain " Zheng Liu
2012-10-26 13:23 ` [PATCH 5/8 v3] ext4: add some tracepoints in " Zheng Liu
2012-10-26 13:23 ` [PATCH 6/8 v3] ext4: reimplement ext4_find_delay_alloc_range on " Zheng Liu
2012-10-26 13:23 ` [PATCH 7/8 v3] ext4: reimplement fiemap " Zheng Liu
2012-10-26 13:23 ` [PATCH 8/8 v3] ext4: introduce lseek SEEK_DATA/SEEK_HOLE support Zheng Liu
2012-10-27 10:05   ` Jeff Liu
2012-10-27 15:30     ` Zheng Liu
2012-11-19  3:17 ` [PATCH 0/8 v3] ext4: extent status tree (step 1) Theodore Ts'o
2012-11-19  5:28   ` Zheng Liu

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