Re: [PATCH] Fix use after free in get_tree_bdev()

2020-04-28 Thread Lukas Czerner
ooks like it ought to occur with other users of get_tree_bdev() such as > XFS, but apparently doesn't. > > Fix this by switching the order of the lines. This fixes the problem I was seeing. Thanks David. Reviewed-by: Lukas Czerner > > Fixes: 6fcf0c72e4b9 ("vfs: add missing

Re: [PATCH] vfs: Handle fs_param_neg_with_empty

2019-10-16 Thread Lukas Czerner
xes: 31d921c7fb96 ("vfs: Add configuration parser helpers") > Reported-by: Lukas Czerner > Signed-off-by: David Howells > --- > > fs/fs_parser.c |5 + > 1 file changed, 5 insertions(+) > > diff --git a/fs/fs_parser.c b/fs/fs_parser.c > index d1930ad

Re: [PATCH v2] VFS: Handle lazytime in do_mount()

2017-09-19 Thread Lukas Czerner
SB_POSIXACL | > + SB_LAZYTIME); Looks good. Although I still think that this can be per mountpoint options. Regardless of that, you can add Reviewed-by: Lukas Czerner > > if (flags & MS_REMOUNT) > retval = do_remount(&path, flags, sb_flags, mnt_flags, > -- > Markus

[RFC][PATCH] fs: Prevent syncing frozen file system

2015-07-09 Thread Lukas Czerner
7;s a problem, but it's certainly different from what we've been used to. Signed-off-by: Lukas Czerner --- fs/super.c | 7 +++ fs/sync.c | 8 2 files changed, 15 insertions(+) diff --git a/fs/super.c b/fs/super.c index b613723..d337c91 100644 --- a/fs/super.c +++ b/fs/s

[PATCH v4 03/20] ext4: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in all ext4 invalidatepage routines. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/inode.c | 30 +++--- include/trace/events/ext4.h |

[PATCH v4 05/20] xfs: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in xfs_vm_invalidatepage() Signed-off-by: Lukas Czerner Reviewed-by: Ben Myers Cc: x...@oss.sgi.com --- v4: use xfs_page_class instead of separate tracepoint fs/xfs/xfs_aops.c |9 + fs/xfs/xfs_trac

[PATCH v4 06/20] ocfs2: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ocfs2_invalidatepage(). Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara Acked-by: Joel Becker --- fs/ocfs2/aops.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.

[PATCH v4 02/20] jbd2: change jbd2_journal_invalidatepage to accept length

2013-05-14 Thread Lukas Czerner
length argument to the jbd2_journal_invalidatepage() and updates all instances in ext4 and ocfs2. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/inode.c |3 ++- fs/jbd2/transaction.c | 24 +--- fs/ocfs2/aops.c |3 ++- include/linux/jbd2.h

[PATCH v4 01/20] mm: change invalidatepage prototype to accept length

2013-05-14 Thread Lukas Czerner
ile system implementations will follow except the file systems where the changes are really simple and should not change the behaviour in any way .Implementation for truncate_page_range() which will be able to accept page unaligned ranges will follow as well. Signed-off-by: Lukas Czerner Cc: Andrew

[PATCH v4 07/20] ceph: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner Acked-by: Sage Weil Cc: ceph-de...@vger.kernel.org --- fs/ceph/addr.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a

[PATCH v4 11/20] Revert "ext4: remove no longer used functions in inode.c"

2013-05-14 Thread Lukas Czerner
and remove ext4_discard_partial_page_buffers() since it is duplicating some code and also partially duplicating work of truncate_pagecache_range(), moreover the old implementation was much clearer. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |4 ++ fs/ext4/inode.c | 120

[PATCH v4 08/20] gfs2: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in gfs2_invalidatepage(). Signed-off-by: Lukas Czerner Acked-by: Steven Whitehouse Cc: cluster-de...@redhat.com --- fs/gfs2/aops.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a

[PATCH v4 13/20] Revert "ext4: fix fsx truncate failure"

2013-05-14 Thread Lukas Czerner
pc64 machine with block size of 1024 bytes without any problems. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/inode.c | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8187c3e..34ebb62 100644 --- a/fs/

[PATCH v4 16/20] ext4: remove unused discard_partial_page_buffers

2013-05-14 Thread Lukas Czerner
The discard_partial_page_buffers is no longer used anywhere so we can simply remove it including the *_no_lock variant and EXT4_DISCARD_PARTIAL_PG_ZERO_UNMAPPED define. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/ext4.h |8 -- fs/ext4/inode.c | 206

[PATCH v4 14/20] ext4: truncate_inode_pages() in orphan cleanup path

2013-05-14 Thread Lukas Czerner
out. Signed-off-by: Lukas Czerner --- fs/ext4/super.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index dbc7c09..b971066 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2173,6 +2173,7 @@ static void ext4_orphan_cleanup(struct

[PATCH v4 10/20] mm: teach truncate_inode_pages_range() to handle non page aligned ranges

2013-05-14 Thread Lukas Czerner
No we can use that new ability in truncate_inode_pages_range(). Signed-off-by: Lukas Czerner Cc: Andrew Morton Cc: Hugh Dickins --- mm/truncate.c | 104 - 1 files changed, 73 insertions(+), 31 deletions(-) diff --git a/mm/truncate.c b/mm/t

[PATCH v4 09/20] reiserfs: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in reiserfs_invalidatepage() Signed-off-by: Lukas Czerner Cc: reiserfs-de...@vger.kernel.org --- fs/reiserfs/inode.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/reise

[PATCH v4 20/20] ext4: Allow punch hole with bigalloc enabled

2013-05-14 Thread Lukas Czerner
d-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/inode.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f504efa..daffbb8 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3557,11 +3557,6 @@ int ext4_punch_hole(s

[PATCH v4 18/20] ext4: update ext4_ext_remove_space trace point

2013-05-14 Thread Lukas Czerner
Add "end" variable. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/extents.c |6 +++--- include/trace/events/ext4.h | 21 ++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c ind

[PATCH v4 19/20] ext4: make punch hole code path work with bigalloc

2013-05-14 Thread Lukas Czerner
enario can be described in simple diagram: |FFF...FF..FF.UUU| ^--^ punch hole . - free space | - cluster boundary F - freed extent U - used extent Also update respective tracepoints to use signed long long type for partial_cluster. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kar

[PATCH v4 17/20] ext4: remove unused code from ext4_remove_blocks()

2013-05-14 Thread Lukas Czerner
nused code completely and makes use of ext4_error() instead of printk if dubious range is provided. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext4/extents.c | 21 - 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/exten

[PATCH v4 12/20] ext4: Call ext4_jbd2_file_inode() after zeroing block

2013-05-14 Thread Lukas Czerner
In data=ordered mode we should call ext4_jbd2_file_inode() so that crash after the truncate transaction has committed does not expose stall data in the tail of the block. Thanks Jan Kara for pointing that out. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c |5 - 1 files changed, 4

[PATCH v4 15/20] ext4: use ext4_zero_partial_blocks in punch_hole

2013-05-14 Thread Lukas Czerner
x and xfstests without any problems. Signed-off-by: Lukas Czerner --- v4: Use start-len arguments in ext4_zero_partial_blocks() fs/ext4/ext4.h |2 + fs/ext4/inode.c | 118 +- 2 files changed, 48 insertions(+), 72 deletions(-) diff --git

[PATCH v4 04/20] jbd: change journal_invalidatepage() to accept length

2013-05-14 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in journal_invalidatepage() and all the users in ext3 file system. Also update ext3 trace point to print out length argument. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara --- fs/ext3/inod

[PATCH v4 00/20] change invalidatepage prototype to accept length

2013-05-14 Thread Lukas Czerner
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 fo

[PATCH v3 01/18] mm: change invalidatepage prototype to accept length

2013-04-09 Thread Lukas Czerner
ile system implementations will follow except the file systems where the changes are really simple and should not change the behaviour in any way .Implementation for truncate_page_range() which will be able to accept page unaligned ranges will follow as well. Signed-off-by: Lukas Czerner Cc: Andrew

[PATCH v3 03/18] ext4: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in all ext4 invalidatepage routines. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c | 30 +++--- include/trace/events/ext4.h | 22 -- 2 files changed,

[PATCH v3 04/18] jbd: change journal_invalidatepage() to accept length

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in journal_invalidatepage() and all the users in ext3 file system. Also update ext3 trace point to print out length argument. Signed-off-by: Lukas Czerner --- fs/ext3/inode.c |6 +++--- fs/

[PATCH v3 07/18] ceph: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner Cc: ceph-de...@vger.kernel.org --- fs/ceph/addr.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ceph/addr.c b/fs/c

[PATCH v3 05/18] xfs: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in xfs_vm_invalidatepage() Signed-off-by: Lukas Czerner Cc: x...@oss.sgi.com --- fs/xfs/xfs_aops.c |5 +++-- fs/xfs/xfs_trace.h | 41 - 2 files changed, 43 inserti

[PATCH v3 06/18] ocfs2: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ocfs2_invalidatepage(). Signed-off-by: Lukas Czerner Cc: Joel Becker --- fs/ocfs2/aops.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 7c47

[PATCH v3 09/18] reiserfs: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in reiserfs_invalidatepage() Signed-off-by: Lukas Czerner Cc: reiserfs-de...@vger.kernel.org --- fs/reiserfs/inode.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/reise

[PATCH v3 12/18] Revert "ext4: fix fsx truncate failure"

2013-04-09 Thread Lukas Czerner
pc64 machine with block size of 1024 bytes without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 5729d21..d58e13c 100644 --- a/fs/ext4/inode.c +++ b/fs/

[PATCH v3 11/18] Revert "ext4: remove no longer used functions in inode.c"

2013-04-09 Thread Lukas Czerner
and remove ext4_discard_partial_page_buffers() since it is duplicating some code and also partially duplicating work of truncate_pagecache_range(), moreover the old implementation was much clearer. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |4 ++ fs/ext4/inode.c | 120

[PATCH v3 14/18] ext4: remove unused discard_partial_page_buffers

2013-04-09 Thread Lukas Czerner
The discard_partial_page_buffers is no longer used anywhere so we can simply remove it including the *_no_lock variant and EXT4_DISCARD_PARTIAL_PG_ZERO_UNMAPPED define. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |8 -- fs/ext4/inode.c | 206

[PATCH v3 16/18] ext4: update ext4_ext_remove_space trace point

2013-04-09 Thread Lukas Czerner
Add "end" variable. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c |6 +++--- include/trace/events/ext4.h | 21 ++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 4adaa8a..9023b76 10064

[PATCH v3 15/18] ext4: remove unused code from ext4_remove_blocks()

2013-04-09 Thread Lukas Czerner
nused code completely and makes use of ext4_error() instead of printk if dubious range is provided. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c | 21 - 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 6c5a70a..4ada

[PATCH v3 10/18] mm: teach truncate_inode_pages_range() to handle non page aligned ranges

2013-04-09 Thread Lukas Czerner
No we can use that new ability in truncate_inode_pages_range(). Signed-off-by: Lukas Czerner Cc: Andrew Morton Cc: Hugh Dickins --- mm/truncate.c | 104 - 1 files changed, 73 insertions(+), 31 deletions(-) diff --git a/mm/truncate.c b/mm/t

[PATCH v3 18/18] ext4: Allow punch hole with bigalloc enabled

2013-04-09 Thread Lukas Czerner
d-off-by: Lukas Czerner --- fs/ext4/inode.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0d452c1..87d6171 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3536,11 +3536,6 @@ int ext4_punch_hole(struct file *file, l

[PATCH v3 17/18] ext4: make punch hole code path work with bigalloc

2013-04-09 Thread Lukas Czerner
enario can be described in simple diagram: |FFF...FF..FF.UUU| ^--^ punch hole . - free space | - cluster boundary F - freed extent U - used extent Also update respective tracepoints to use signed long long type for partial_cluster. Signed-off-by: Lukas Czerner --- fs/ext4

[PATCH v3 08/18] gfs2: use ->invalidatepage() length argument

2013-04-09 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in gfs2_invalidatepage(). Signed-off-by: Lukas Czerner Cc: cluster-de...@redhat.com --- fs/gfs2/aops.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aop

[PATCH v3 13/18] ext4: use ext4_zero_partial_blocks in punch_hole

2013-04-09 Thread Lukas Czerner
x and xfstests without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |2 + fs/ext4/inode.c | 110 --- 2 files changed, 42 insertions(+), 70 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3aa5943..2428244 1

[PATCH v3 00/18] change invalidatepage prototype to accept length

2013-04-09 Thread Lukas Czerner
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 fo

[PATCH v3 02/18] jbd2: change jbd2_journal_invalidatepage to accept length

2013-04-09 Thread Lukas Czerner
length argument to the jbd2_journal_invalidatepage() and updates all instances in ext4 and ocfs2. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c |3 ++- fs/jbd2/transaction.c | 24 +--- fs/ocfs2/aops.c |3 ++- include/linux/jbd2.h |2 +- 4 files

[PATCH v2 03/18] ext4: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in all ext4 invalidatepage routines. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c | 47 ++ include/trace/events/ext4.h | 22 +++- 2 fi

[PATCH v2 01/18] mm: change invalidatepage prototype to accept length

2013-02-05 Thread Lukas Czerner
ile system implementations will follow except the file systems where the changes are really simple and should not change the behaviour in any way .Implementation for truncate_page_range() which will be able to accept page unaligned ranges will follow as well. Signed-off-by: Lukas Czerner Cc: Andrew

[PATCH v2 04/18] jbd: change journal_invalidatepage() to accept length

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in journal_invalidatepage() and all the users in ext3 file system. Also update ext3 trace point to print out length argument. Signed-off-by: Lukas Czerner --- fs/ext3/inode.c |6 +++--- fs/

[PATCH v2 05/18] xfs: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in xfs_vm_invalidatepage() Signed-off-by: Lukas Czerner Cc: x...@oss.sgi.com --- fs/xfs/xfs_aops.c |5 +++-- fs/xfs/xfs_trace.h | 41 - 2 files changed, 43 inserti

[PATCH v2 11/18] Revert "ext4: remove no longer used functions in inode.c"

2013-02-05 Thread Lukas Czerner
and remove ext4_discard_partial_page_buffers() since it is duplicating some code and also partially duplicating work of truncate_pagecache_range(), moreover the old implementation was much clearer. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |4 ++ fs/ext4/inode.c | 120

[PATCH v2 09/18] reiserfs: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in reiserfs_invalidatepage() Signed-off-by: Lukas Czerner Cc: reiserfs-de...@vger.kernel.org --- fs/reiserfs/inode.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/reise

[PATCH v2 10/18] mm: teach truncate_inode_pages_range() to handle non page aligned ranges

2013-02-05 Thread Lukas Czerner
No we can use that new ability in truncate_inode_pages_range(). Signed-off-by: Lukas Czerner Cc: Andrew Morton Cc: Hugh Dickins --- mm/truncate.c | 104 - 1 files changed, 73 insertions(+), 31 deletions(-) diff --git a/mm/truncate.c b/mm/t

[PATCH v2 12/18] Revert "ext4: fix fsx truncate failure"

2013-02-05 Thread Lukas Czerner
pc64 machine with block size of 1024 bytes without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c | 13 ++--- fs/ext4/indirect.c | 13 ++--- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 5ae

[PATCH v2 13/18] ext4: use ext4_zero_partial_blocks in punch_hole

2013-02-05 Thread Lukas Czerner
f the ext4_discard_partial_page_buffers() completely. This has been tested on ppc64 with 1k block size with fsx and xfstests without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h|2 + fs/ext4/extents.c | 79 ++--- fs/ext4/in

[PATCH v2 08/18] gfs2: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in gfs2_invalidatepage(). Signed-off-by: Lukas Czerner Cc: cluster-de...@redhat.com --- fs/gfs2/aops.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aop

[PATCH v2 14/18] ext4: remove unused discard_partial_page_buffers

2013-02-05 Thread Lukas Czerner
The discard_partial_page_buffers is no longer used anywhere so we can simply remove it including the *_no_lock variant and EXT4_DISCARD_PARTIAL_PG_ZERO_UNMAPPED define. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |8 -- fs/ext4/inode.c | 206

[PATCH v2 16/18] ext4: update ext4_ext_remove_space trace point

2013-02-05 Thread Lukas Czerner
Add "end" variable. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c |6 +++--- include/trace/events/ext4.h | 21 ++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 966a09e..2b7e521 10064

[PATCH v2 17/18] ext4: make punch hole code path work with bigalloc

2013-02-05 Thread Lukas Czerner
enario can be described in simple diagram: |FFF...FF..FF.UUU| ^--^ punch hole . - free space | - cluster boundary F - freed extent U - used extent Also update respective tracepoints to use signed long long type for partial_cluster. Signed-off-by: Lukas Czerner --- fs/ext4

[PATCH v2 15/18] ext4: remove unused code from ext4_remove_blocks()

2013-02-05 Thread Lukas Czerner
nused code completely and makes use of ext4_error() instead of printk if dubious range is provided. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c | 21 - 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 7b44dc1..966a

[PATCH v2 18/18] ext4: Allow punch hole with bigalloc enabled

2013-02-05 Thread Lukas Czerner
d-off-by: Lukas Czerner --- fs/ext4/inode.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e7bf594..01cf049 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3530,11 +3530,6 @@ int ext4_punch_hole(struct file *file, l

[PATCH v2 06/18] ocfs2: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ocfs2_invalidatepage(). Signed-off-by: Lukas Czerner Cc: Joel Becker --- fs/ocfs2/aops.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 1393

[PATCH v2 07/18] ceph: use ->invalidatepage() length argument

2013-02-05 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner Cc: ceph-de...@vger.kernel.org --- fs/ceph/addr.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ceph/addr.c b/fs/c

[PATCH v2 00/18] change invalidatepage prototype to accept length

2013-02-05 Thread Lukas Czerner
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 fo

[PATCH v2 02/18] jbd2: change jbd2_journal_invalidatepage to accept length

2013-02-05 Thread Lukas Czerner
length argument to the jbd2_journal_invalidatepage() and updates all instances in ext4 and ocfs2. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c |3 ++- fs/jbd2/transaction.c | 24 +--- fs/ocfs2/aops.c |3 ++- include/linux/jbd2.h |2 +- 4 files

[PATCH 04/18] jbd: change journal_invalidatepage() to accept length

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in journal_invalidatepage() and all the users in ext3 file system. Also update ext3 trace point to print out length argument. Signed-off-by: Lukas Czerner --- fs/ext3/inode.c |6 +++--- fs/

[PATCH 02/18] jbd2: change jbd2_journal_invalidatepage to accept length

2013-02-01 Thread Lukas Czerner
length argument to the jbd2_journal_invalidatepage() and updates all instances in ext4 and ocfs2. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c |3 ++- fs/jbd2/transaction.c | 24 +--- fs/ocfs2/aops.c |3 ++- include/linux/jbd2.h |2 +- 4 files

[PATCH 06/18] ocfs2: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ocfs2_invalidatepage(). Signed-off-by: Lukas Czerner --- fs/ocfs2/aops.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 1393114..d8c0076 100

[PATCH 05/18] xfs: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in xfs_vm_invalidatepage() Signed-off-by: Lukas Czerner Cc: x...@oss.sgi.com --- fs/xfs/xfs_aops.c |5 +++-- fs/xfs/xfs_trace.h | 41 - 2 files changed, 43 inserti

[PATCH 01/18] mm: change invalidatepage prototype to accept length

2013-02-01 Thread Lukas Czerner
ile system implementations will follow except the file systems where the changes are really simple and should not change the behaviour in any way .Implementation for truncate_page_range() which will be able to accept page unaligned ranges will follow as well. Signed-off-by: Lukas Czerner Cc: Andrew

[PATCH 12/18] Revert "ext4: fix fsx truncate failure"

2013-02-01 Thread Lukas Czerner
pc64 machine with block size of 1024 bytes without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c | 13 ++--- fs/ext4/indirect.c | 13 ++--- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 5ae

[PATCH 11/18] Revert "ext4: remove no longer used functions in inode.c"

2013-02-01 Thread Lukas Czerner
and remove ext4_discard_partial_page_buffers() since it is duplicating some code and also partially duplicating work of truncate_pagecache_range(), moreover the old implementation was much clearer. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |4 ++ fs/ext4/inode.c | 120

[PATCH 07/18] ceph: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner --- fs/ceph/addr.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 8953532..1e09

[PATCH 08/18] gfs2: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in gfs2_invalidatepage(). Signed-off-by: Lukas Czerner --- fs/gfs2/aops.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 5bd558c..3cf3

[PATCH 13/18] ext4: use ext4_zero_partial_blocks in punch_hole

2013-02-01 Thread Lukas Czerner
f the ext4_discard_partial_page_buffers() completely. This has been tested on ppc64 with 1k block size with fsx and xfstests without any problems. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h|2 + fs/ext4/extents.c | 79 ++--- fs/ext4/in

[PATCH 15/18] ext4: remove unused code from ext4_remove_blocks()

2013-02-01 Thread Lukas Czerner
nused code completely and makes use of ext4_error() instead of printk if dubious range is provided. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c | 21 - 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 7b44dc1..966a

[PATCH 09/18] reiserfs: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in reiserfs_invalidatepage() Signed-off-by: Lukas Czerner --- fs/reiserfs/inode.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c in

[PATCH 10/18] mm: teach truncate_inode_pages_range() to handle non page aligned ranges

2013-02-01 Thread Lukas Czerner
No we can use that new ability in truncate_inode_pages_range(). This was based on the code provided by Hugh Dickins with some small changes to make use of do_invalidatepage_range(). Signed-off-by: Lukas Czerner Cc: Andrew Morton Cc: Hugh Dickins --

[PATCH 16/18] ext4: update ext4_ext_remove_space trace point

2013-02-01 Thread Lukas Czerner
Add "end" variable. Signed-off-by: Lukas Czerner --- fs/ext4/extents.c |6 +++--- include/trace/events/ext4.h | 21 ++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 966a09e..2b7e521 10064

[PATCH 17/18] ext4: make punch hole code path work with bigalloc

2013-02-01 Thread Lukas Czerner
enario can be described in simple diagram: |FFF...FF..FF.UUU| ^--^ punch hole . - free space | - cluster boundary F - freed extent U - used extent Also update respective tracepoints to use signed long long type for partial_cluster. Signed-off-by: Lukas Czerner --- fs/ext4

[PATCH 18/18] ext4: Allow punch hole with bigalloc enabled

2013-02-01 Thread Lukas Czerner
d-off-by: Lukas Czerner --- fs/ext4/inode.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e7bf594..01cf049 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3530,11 +3530,6 @@ int ext4_punch_hole(struct file *file, l

[PATCH 14/18] ext4: remove unused discard_partial_page_buffers

2013-02-01 Thread Lukas Czerner
The discard_partial_page_buffers is no longer used anywhere so we can simply remove it including the *_no_lock variant and EXT4_DISCARD_PARTIAL_PG_ZERO_UNMAPPED define. Signed-off-by: Lukas Czerner --- fs/ext4/ext4.h |8 -- fs/ext4/inode.c | 206

[RFC] mm: change invalidatepage prototype to accept length

2013-02-01 Thread Lukas Czerner
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 fo

[PATCH 03/18] ext4: use ->invalidatepage() length argument

2013-02-01 Thread Lukas Czerner
->invalidatepage() aop now accepts range to invalidate so we can make use of it in all ext4 invalidatepage routines. Signed-off-by: Lukas Czerner --- fs/ext4/inode.c | 47 ++ include/trace/events/ext4.h | 22 +++- 2 fi

[PATCH 1/2 v3] wait: add wait_event_lock_irq() interface

2012-11-30 Thread Lukas Czerner
etting and wait queue removal. Signed-off-by: Lukas Czerner Cc: Neil Brown Cc: David Howells Cc: Ingo Molnar Cc: Peter Zijlstra --- v2: add interruptible variant, swap cmd and schedule, use prepare_to_wait v3: swap cmd and schedule so we call cmd before schedule drivers/md/md.c |2 +

[PATCH 2/2 v6] loop: Limit the number of requests in the bio list

2012-11-30 Thread Lukas Czerner
;ll wake up the process as we process the bios form the list. Some threshold hysteresis is in place to avoid high frequency oscillation. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- v2: add threshold hysteresis v3: Wait uninterruptible, use nr_congestion_off/on v4: use wait_event_lo

[PATCH 2/2 v5] loop: Limit the number of requests in the bio list

2012-11-22 Thread Lukas Czerner
;ll wake up the process as we process the bios form the list. Some threshold hysteresis is in place to avoid high frequency oscillation. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- v2: add threshold hysteresis v3: Wait uninterruptible, use nr_congestion_off/on v4: use wait_event_lo

[PATCH 1/2 v2] wait: add wait_event_lock_irq() interface

2012-11-22 Thread Lukas Czerner
is should also fix theoretical race on waitqueue while using simultaneously wait_event_lock_irq() and wait_event() because of lack of locking around current state setting and wait queue removal. Signed-off-by: Lukas Czerner Cc: Neil Brown Cc: David Howells Cc: Ingo Molnar Cc: Peter Zijls

[PATCH 1/2] wait: add wait_event_lock_irq() interface

2012-11-20 Thread Lukas Czerner
rwards. We will leave the macro with the lock held. Signed-off-by: Lukas Czerner Cc: Neil Brown Cc: David Howells Cc: Ingo Molnar Cc: Peter Zijlstra --- drivers/md/md.c |2 +- drivers/md/md.h | 26 - drivers/md/raid1.c | 15 - drivers/md/raid10

[PATCH 2/2 v4] loop: Limit the number of requests in the bio list

2012-11-20 Thread Lukas Czerner
;ll wake up the process as we process the bios form the list. Some threshold hysteresis is in place to avoid high frequency oscillation. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- v2: add threshold hysteresis v3: Wait uninterruptible, use nr_congestion_off/on v4: use wait

[PATCH v3] loop: Limit the number of requests in the bio list

2012-11-13 Thread Lukas Czerner
;ll wake up the process as we process the bios form the list. Some threshold hysteresis is in place to avoid high frequency oscillation. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- v2: add threshold hysteresis v3: Wait uninterruptible, use nr_congestion_off/on drivers/bloc

[PATCH v2] loop: Limit the number of requests in the bio list

2012-10-16 Thread Lukas Czerner
f requests. We'll wake up the process as we process the bios form the list. Some threshold hysteresis is in place to avoid high frequency oscillation. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- v2: add threshold hysteresis drivers/block/loop.c | 16 inclu

[PATCH] loop: Limit the number of requests in the bio list

2012-09-27 Thread Lukas Czerner
e process as we process the bios form the list. Signed-off-by: Lukas Czerner Reported-by: Dave Chinner --- drivers/block/loop.c | 13 + include/linux/loop.h |3 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.

[PATCH] scsi_debug: Fix off-by-one bug when unmapping region

2012-08-16 Thread Lukas Czerner
fstrim. Since the 'end' semantic is the same in several functions there this commit just fixes the condition to use the 'end' variable correctly in that context. Reported-by: Paolo Bonzini Signed-off-by: Lukas Czerner --- drivers/scsi/scsi_debug.c |2 +- 1 files changed