Re: [Cluster-devel] [PATCH 00/20] gfs2-utils: Misc. tidy-ups

2018-03-05 Thread Andrew Price
On 05/03/18 19:08, Bob Peterson wrote: - Original Message - | This is an accumulation of yak shaving patches and cleanups that I want to | get out of the way. There shouldn't be anything controversial here. The main | theme is to make it easier to use libgfs2 without using

Re: [Cluster-devel] [PATCH 17/20] libgfs2: Don't use buffer_heads in gfs2_log_descriptor_{in, out}

2018-03-05 Thread Andrew Price
On 05/03/18 19:00, Bob Peterson wrote: - Original Message - | Signed-off-by: Andrew Price | --- | gfs2/edit/gfs2hex.c| 2 +- | gfs2/edit/journal.c| 21 + | gfs2/libgfs2/libgfs2.h | 6 ++ | gfs2/libgfs2/ondisk.c | 15 ++-

Re: [Cluster-devel] [PATCH 00/20] gfs2-utils: Misc. tidy-ups

2018-03-05 Thread Bob Peterson
- Original Message - | This is an accumulation of yak shaving patches and cleanups that I want to | get out of the way. There shouldn't be anything controversial here. The main | theme is to make it easier to use libgfs2 without using gfs2_buffer_heads, | and it gets rid of some 'dummy_bh'

Re: [Cluster-devel] [PATCH 18/20] libgfs2: Don't use buffer_heads in gfs2_quota_change_{in, out}

2018-03-05 Thread Bob Peterson
- Original Message - | Signed-off-by: Andrew Price | --- | gfs2/edit/gfs2hex.c| 2 +- | gfs2/libgfs2/libgfs2.h | 6 ++ | gfs2/libgfs2/ondisk.c | 20 | 3 files changed, 11 insertions(+), 17 deletions(-) Hi, Function

Re: [Cluster-devel] [PATCH 17/20] libgfs2: Don't use buffer_heads in gfs2_log_descriptor_{in, out}

2018-03-05 Thread Bob Peterson
- Original Message - | Signed-off-by: Andrew Price | --- | gfs2/edit/gfs2hex.c| 2 +- | gfs2/edit/journal.c| 21 + | gfs2/libgfs2/libgfs2.h | 6 ++ | gfs2/libgfs2/ondisk.c | 15 ++- | 4 files changed, 18 insertions(+), 26

[Cluster-devel] [PATCH 03/20] libgfs2: Plug an alignment hole in gfs2_sbd

2018-03-05 Thread Andrew Price
Allows struct gfs2_sbd to fit in 14 cachelines instead of 15 Signed-off-by: Andrew Price --- gfs2/libgfs2/libgfs2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index a85b9ce2..dfe593ec 100644 ---

[Cluster-devel] [PATCH 10/20] libgfs2: Don't use buffer_heads in gfs2_rgrp_in

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/extended.c| 4 ++-- gfs2/edit/gfs2hex.c | 2 +- gfs2/edit/hexedit.c | 2 +- gfs2/edit/savemeta.c| 2 +- gfs2/fsck/fs_recovery.c | 2 +- gfs2/libgfs2/libgfs2.h | 2 +- gfs2/libgfs2/ondisk.c | 6 +++---

[Cluster-devel] [PATCH 04/20] libgfs2: Plug an alignment hole in gfs2_buffer_head

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/libgfs2/libgfs2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index dfe593ec..6970c11d 100644 --- a/gfs2/libgfs2/libgfs2.h +++ b/gfs2/libgfs2/libgfs2.h @@ -217,12

[Cluster-devel] [PATCH 17/20] libgfs2: Don't use buffer_heads in gfs2_log_descriptor_{in, out}

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/gfs2hex.c| 2 +- gfs2/edit/journal.c| 21 + gfs2/libgfs2/libgfs2.h | 6 ++ gfs2/libgfs2/ondisk.c | 15 ++- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git

[Cluster-devel] [PATCH 01/20] libgfs2: Remove unused lock* fields from gfs2_sbd

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/libgfs2/libgfs2.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index 15d2a9d1..641cac24 100644 --- a/gfs2/libgfs2/libgfs2.h +++ b/gfs2/libgfs2/libgfs2.h @@ -256,8 +256,6 @@ struct

[Cluster-devel] [PATCH 16/20] libgfs2: Remove gfs2_log_header_out_bh

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/fsck/fs_recovery.c | 3 ++- gfs2/libgfs2/libgfs2.h| 1 - gfs2/libgfs2/ondisk.c | 6 -- gfs2/libgfs2/structures.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/gfs2/fsck/fs_recovery.c

[Cluster-devel] [PATCH 02/20] libgfs2: Remove sb_addr from gfs2_sbd

2018-03-05 Thread Andrew Price
The sb address is constant so we can just shift it to the fs block size. Signed-off-by: Andrew Price --- gfs2/convert/gfs2_convert.c | 2 +- gfs2/edit/hexedit.c | 4 ++-- gfs2/edit/savemeta.c| 2 +- gfs2/fsck/fs_recovery.c | 2 +- gfs2/fsck/fsck.h

[Cluster-devel] [PATCH 00/20] gfs2-utils: Misc. tidy-ups

2018-03-05 Thread Andrew Price
This is an accumulation of yak shaving patches and cleanups that I want to get out of the way. There shouldn't be anything controversial here. The main theme is to make it easier to use libgfs2 without using gfs2_buffer_heads, and it gets rid of some 'dummy_bh' uses. Andrew Price (20):

[Cluster-devel] [PATCH 06/20] libgfs2: Remove gfs2_meta_header_out_bh()

2018-03-05 Thread Andrew Price
The bmodified() calls have to be preserved until the brelse() calls can be replaced with explicit writes and frees, where required. Signed-off-by: Andrew Price --- gfs2/convert/gfs2_convert.c | 12 gfs2/fsck/rgrepair.c| 3 ++- gfs2/libgfs2/fs_geometry.c

[Cluster-devel] [PATCH 11/20] libgfs2: Remove gfs2_rgrp_out_bh

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/convert/gfs2_convert.c | 5 +++-- gfs2/edit/extended.c| 2 +- gfs2/edit/hexedit.c | 3 ++- gfs2/fsck/initialize.c | 6 -- gfs2/fsck/metawalk.c| 3 ++- gfs2/fsck/pass5.c | 2 +-

[Cluster-devel] [PATCH 15/20] libgfs2: Don't use buffer_heads in gfs2_log_header_in

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/gfs2hex.c | 2 +- gfs2/edit/journal.c | 4 ++-- gfs2/libgfs2/libgfs2.h | 4 ++-- gfs2/libgfs2/ondisk.c | 12 ++-- gfs2/libgfs2/recovery.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git

[Cluster-devel] [PATCH 20/20] mkfs.gfs2: Silence an integer overflow warning

2018-03-05 Thread Andrew Price
No bug here, just need to acknowledge the widening. Signed-off-by: Andrew Price --- gfs2/mkfs/main_mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c index 42ce6dd6..297ff7a3 100644 ---

[Cluster-devel] [PATCH 09/20] libgfs2: Don't use buffer_heads in gfs2_sb_in

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/convert/gfs2_convert.c | 2 +- gfs2/edit/gfs2hex.c | 2 +- gfs2/edit/hexedit.c | 4 ++-- gfs2/edit/savemeta.c| 14 +++--- gfs2/glocktop/glocktop.c| 2 +- gfs2/libgfs2/libgfs2.h | 2 +-

[Cluster-devel] [PATCH 13/20] libgfs2: Remove gfs2_dinode_out_bh

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/convert/gfs2_convert.c | 2 +- gfs2/fsck/lost_n_found.c| 2 +- gfs2/fsck/rgrepair.c| 3 +-- gfs2/libgfs2/fs_ops.c | 13 ++--- gfs2/libgfs2/gfs1.c | 5 ++--- gfs2/libgfs2/libgfs2.h | 1 -

[Cluster-devel] [PATCH 05/20] libgfs2: Plug an alignment hole in gfs2_inode

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/libgfs2/libgfs2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h index 6970c11d..5767c43a 100644 --- a/gfs2/libgfs2/libgfs2.h +++ b/gfs2/libgfs2/libgfs2.h @@ -231,11

[Cluster-devel] [PATCH 07/20] libgfs2: Don't pass an extlen to block_map where not required

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/fsck/fs_recovery.c | 3 +-- gfs2/fsck/rgrepair.c| 3 +-- gfs2/libgfs2/recovery.c | 7 +++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/gfs2/fsck/fs_recovery.c b/gfs2/fsck/fs_recovery.c index 7284868b..4fd28796

[Cluster-devel] [PATCH 08/20] libgfs2: Don't use a buffer_head in gfs2_meta_header_in

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/gfs2hex.c| 4 ++-- gfs2/edit/hexedit.c| 2 +- gfs2/edit/savemeta.c | 4 ++-- gfs2/fsck/initialize.c | 2 +- gfs2/fsck/pass1.c | 2 +- gfs2/fsck/rgrepair.c | 8 gfs2/libgfs2/gfs1.c| 4 ++--

[Cluster-devel] [PATCH 19/20] libgfs2: Fix two unused variable warnings

2018-03-05 Thread Andrew Price
These only occur without v2 log headers. Signed-off-by: Andrew Price --- gfs2/libgfs2/ondisk.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c index b78b198a..366e7c9a 100644 ---

[Cluster-devel] [PATCH 12/20] libgfs2: Don't use buffer_heads in gfs2_dinode_in

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/hexedit.c| 4 ++-- gfs2/edit/journal.c| 4 ++-- gfs2/edit/savemeta.c | 2 +- gfs2/fsck/initialize.c | 2 +- gfs2/libgfs2/fs_ops.c | 2 +- gfs2/libgfs2/libgfs2.h | 3 +-- gfs2/libgfs2/ondisk.c | 6 +++--- 7 files changed,

[Cluster-devel] [PATCH 18/20] libgfs2: Don't use buffer_heads in gfs2_quota_change_{in, out}

2018-03-05 Thread Andrew Price
Signed-off-by: Andrew Price --- gfs2/edit/gfs2hex.c| 2 +- gfs2/libgfs2/libgfs2.h | 6 ++ gfs2/libgfs2/ondisk.c | 20 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index

Re: [Cluster-devel] [PATCH] fsck.gfs2: Don't check lh_crc for older filesystems

2018-03-05 Thread Bob Peterson
- Original Message - | This fixes the case where fsck.gfs2 is built against v2 log headers but | the filesystem pre-dates them and so lh_crc is 0. | | Signed-off-by: Andrew Price | --- Hi, Yes, that looks right. ACK. Regards, Bob Peterson Red Hat File Systems

[Cluster-devel] [PATCH] fsck.gfs2: Don't check lh_crc for older filesystems

2018-03-05 Thread Andrew Price
This fixes the case where fsck.gfs2 is built against v2 log headers but the filesystem pre-dates them and so lh_crc is 0. Signed-off-by: Andrew Price --- gfs2/libgfs2/recovery.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gfs2/libgfs2/recovery.c

Re: [Cluster-devel] [PATCH] gfs2: Improve gfs2_block_map comment

2018-03-05 Thread Bob Peterson
- Original Message - | Signed-off-by: Andreas Gruenbacher | --- | fs/gfs2/bmap.c | 15 +++ | 1 file changed, 11 insertions(+), 4 deletions(-) Hi, Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:

Re: [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2)

2018-03-05 Thread Bob Peterson
- Original Message - | It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for | block_map"' introduced another bug in gfs2_iomap_begin that can cause | gfs2_block_map to set bh->b_size of an actual buffer to 0. This can | lead to arbitrary incorrect behavior including

[Cluster-devel] [PATCH] gfs2: Improve gfs2_block_map comment

2018-03-05 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 51f940e76c5e..8c25a64d8ae0 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -812,15 +812,22 @@

[Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2)

2018-03-05 Thread Andreas Gruenbacher
It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for block_map"' introduced another bug in gfs2_iomap_begin that can cause gfs2_block_map to set bh->b_size of an actual buffer to 0. This can lead to arbitrary incorrect behavior including crashes or disk corruption. Revert the

Re: [Cluster-devel] [PATCH] gfs2: Dirty source inode during rename

2018-03-05 Thread Steven Whitehouse
Acked-by: Steven Whitehouse Looks good. Thanks, Steve. On 27/02/18 11:50, Andreas Gruenbacher wrote: Mark the source inode dirty during a rename instead of just updating the underlying buffer head. Otherwise, fsync may find the inode clean and will then skip flushing