From: Lukas Czerner <lczerner@redhat.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-ext4@vger.kernel.org
Subject: [PATCH v2 00/18] change invalidatepage prototype to accept length
Date: Tue, 5 Feb 2013 10:11:53 +0100 [thread overview]
Message-ID: <1360055531-26309-1-git-send-email-lczerner@redhat.com> (raw)
Hi,
This set of patches are aimed to allow truncate_inode_pages_range() handle
ranges which are not aligned at the end of the page. Currently it will
hit BUG_ON() when the end of the range is not aligned. Punch hole feature
however can benefit from this ability saving file systems some work not
forcing them to implement their own invalidate code to handle unaligned
ranges.
In order for this to woke we need change ->invalidatepage() address space
operation to to accept range to invalidate by adding 'length' argument in
addition to 'offset'. This is different from my previous attempt to create
new aop ->invalidatepage_range (http://lwn.net/Articles/514828/) which I
reconsidered to ne unnecessary.
For description purposes this patch set can be divided into following
groups:
patch 0001: Change ->invalidatepage() prototype adding 'length' argument
and changing all the instances. In very simple cases file
system methods are completely adapted, otherwise only
prototype is changed and the rest will follow. This patch
also implement the 'range' invalidation in
block_invalidatepage().
patch 0002 - 0009:
Make the use of new 'length' argument in the file system
itself. Some file systems can take advantage of it trying
to invalidate only portion of the page if possible, some
can't, however none of the file systems currently attempt
to truncate non page aligned ranges.
patch 0010: Teach truncate_inode_pages_range() to handle non page aligned
ranges.
patch 0012 - 0018:
Ext4 changes build on top of previous changes, simplifying
punch hole code. Not all changes are realated specifically
to invalidatepage() change, but all are related to the punch
hole feature.
Even though this patch set would mainly affect functionality of the file
file systems implementing punch hole I've tested all the following file
system using xfstests without noticing any bugs related to this change.
ext3, ext4, xfs, btrfs, gfs2 and reiserfs
the much smaller changes in other file systems has not been directly tested,
so please review.
Changes in v2:
patch 10/18 - add more comments. Do not initialize at declaration
to make things more obvious and better to read.
Thanks!
-Lukas
--
Documentation/filesystems/Locking | 6 +-
Documentation/filesystems/vfs.txt | 20 ++--
fs/9p/vfs_addr.c | 5 +-
fs/afs/file.c | 10 +-
fs/btrfs/disk-io.c | 3 +-
fs/btrfs/extent_io.c | 2 +-
fs/btrfs/inode.c | 3 +-
fs/buffer.c | 21 ++-
fs/ceph/addr.c | 15 +-
fs/cifs/file.c | 5 +-
fs/exofs/inode.c | 6 +-
fs/ext3/inode.c | 9 +-
fs/ext4/ext4.h | 14 +-
fs/ext4/extents.c | 188 ++++++++--------------
fs/ext4/indirect.c | 13 +--
fs/ext4/inode.c | 320 ++++++++++++++++--------------------
fs/f2fs/data.c | 3 +-
fs/f2fs/node.c | 3 +-
fs/gfs2/aops.c | 17 ++-
fs/jbd/transaction.c | 19 ++-
fs/jbd2/transaction.c | 24 ++-
fs/jfs/jfs_metapage.c | 5 +-
fs/logfs/file.c | 3 +-
fs/logfs/segment.c | 3 +-
fs/nfs/file.c | 8 +-
fs/ntfs/aops.c | 2 +-
fs/ocfs2/aops.c | 5 +-
fs/reiserfs/inode.c | 12 +-
fs/ubifs/file.c | 5 +-
fs/xfs/xfs_aops.c | 10 +-
fs/xfs/xfs_trace.h | 41 +++++-
include/linux/buffer_head.h | 3 +-
include/linux/fs.h | 2 +-
include/linux/jbd.h | 2 +-
include/linux/jbd2.h | 2 +-
include/linux/mm.h | 3 +-
include/trace/events/ext3.h | 12 +-
include/trace/events/ext4.h | 64 +++++---
mm/readahead.c | 2 +-
mm/truncate.c | 117 ++++++++++----
40 files changed, 538 insertions(+), 469 deletions(-)
[PATCH v2 01/18] mm: change invalidatepage prototype to accept
[PATCH v2 02/18] jbd2: change jbd2_journal_invalidatepage to accept
[PATCH v2 03/18] ext4: use ->invalidatepage() length argument
[PATCH v2 04/18] jbd: change journal_invalidatepage() to accept
[PATCH v2 05/18] xfs: use ->invalidatepage() length argument
[PATCH v2 06/18] ocfs2: use ->invalidatepage() length argument
[PATCH v2 07/18] ceph: use ->invalidatepage() length argument
[PATCH v2 08/18] gfs2: use ->invalidatepage() length argument
[PATCH v2 09/18] reiserfs: use ->invalidatepage() length argument
[PATCH v2 10/18] mm: teach truncate_inode_pages_range() to handle
[PATCH v2 11/18] Revert "ext4: remove no longer used functions in
[PATCH v2 12/18] Revert "ext4: fix fsx truncate failure"
[PATCH v2 13/18] ext4: use ext4_zero_partial_blocks in punch_hole
[PATCH v2 14/18] ext4: remove unused discard_partial_page_buffers
[PATCH v2 15/18] ext4: remove unused code from ext4_remove_blocks()
[PATCH v2 16/18] ext4: update ext4_ext_remove_space trace point
[PATCH v2 17/18] ext4: make punch hole code path work with bigalloc
[PATCH v2 18/18] ext4: Allow punch hole with bigalloc enabled
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2013-02-05 9:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 9:11 Lukas Czerner [this message]
2013-02-05 9:11 ` [PATCH v2 01/18] mm: change invalidatepage prototype to accept length Lukas Czerner
2013-02-05 9:11 ` [PATCH v2 02/18] jbd2: change jbd2_journal_invalidatepage " Lukas Czerner
2013-02-05 9:11 ` [PATCH v2 03/18] ext4: use ->invalidatepage() length argument Lukas Czerner
2013-02-05 9:11 ` [PATCH v2 04/18] jbd: change journal_invalidatepage() to accept length Lukas Czerner
2013-02-05 9:11 ` [PATCH v2 05/18] xfs: use ->invalidatepage() length argument Lukas Czerner
2013-02-05 9:11 ` [PATCH v2 06/18] ocfs2: " Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 07/18] ceph: " Lukas Czerner
2013-02-05 16:39 ` Sage Weil
2013-02-05 9:12 ` [PATCH v2 08/18] gfs2: " Lukas Czerner
2013-02-05 9:47 ` [Cluster-devel] " Steven Whitehouse
2013-02-05 9:12 ` [PATCH v2 09/18] reiserfs: " Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 10/18] mm: teach truncate_inode_pages_range() to handle non page aligned ranges Lukas Czerner
2013-02-07 23:40 ` Andrew Morton
2013-02-08 9:08 ` Lukáš Czerner
2013-02-21 8:33 ` Lukáš Czerner
2013-02-21 21:49 ` Andrew Morton
2013-02-22 8:06 ` Lukáš Czerner
2013-02-05 9:12 ` [PATCH v2 11/18] Revert "ext4: remove no longer used functions in inode.c" Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 12/18] Revert "ext4: fix fsx truncate failure" Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 13/18] ext4: use ext4_zero_partial_blocks in punch_hole Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 14/18] ext4: remove unused discard_partial_page_buffers Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 15/18] ext4: remove unused code from ext4_remove_blocks() Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 16/18] ext4: update ext4_ext_remove_space trace point Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 17/18] ext4: make punch hole code path work with bigalloc Lukas Czerner
2013-02-05 9:12 ` [PATCH v2 18/18] ext4: Allow punch hole with bigalloc enabled Lukas Czerner
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=1360055531-26309-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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).