Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
Andreas Gruenbacher
maintainerPATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
There's no point in sharing the internal structure of lock value blocks with user space.
--- fs/gfs2/glock.h | 1 + fs/gfs2/incore.h | 1 + fs/gfs2/rgrp.c | 10 ++++++++++ include/uapi/linux/gfs2_ondisk.h | 10 ---------- 4 files changed, 12 insertions(+), 10 deletions(-)
fs/gfs2/glock.h +1 -0
@@ -306,4 +306,5 @@ static inline void glock_clear_object(struct gfs2_glock *gl, void *object) spin_unlock(&gl->gl_lockref.lock); } +#endif /* __GLOCK_DOT_H__ */
fs/gfs2/incore.h +1 -0
@@ -33,6 +33,7 @@ struct gfs2_trans;struct gfs2_jdesc ;struct gfs2_sbd ;struct lm_lockops ; +struct gfs2_rgrp_lvb ;typedef void (*gfs2_glop_bh_t ) (struct gfs2_glock *gl,unsigned int ret);
fs/gfs2/rgrp.c +10 -0
@@ -46,6 +46,16 @@#define LBITSKIP00 (0x0000000000000000UL)#endif +struct gfs2_rgrp_lvb { +__be32 rl_magic; +__be32 rl_flags; +__be32 rl_free; +__be32 rl_dinodes; +__be64 rl_igeneration; +__be32 rl_unlinked; +__be32 __pad; +}; +/* * These routines are used by the resource group routines (rgrp.c) * to keep track of block allocation. Each block is represented by two
include/uapi/linux/gfs2_ondisk.h +0 -10
@@ -171,16 +171,6 @@ struct gfs2_rindex {#define GFS2_RGF_NOALLOC 0x00000008#define GFS2_RGF_TRIMMED 0x00000010 -struct gfs2_rgrp_lvb { -__be32 rl_magic; -__be32 rl_flags; -__be32 rl_free; -__be32 rl_dinodes; -__be64 rl_igeneration; -__be32 rl_unlinked; -__be32 __pad; -}; -struct gfs2_rgrp {struct gfs2_meta_header rg_header;
Signature · 1 line
2.20.1
PATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
Hi,
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
Steve.
Quoted 73 lines
Signed-off-by Andreas Gruenbacher <[email protected]>--- fs/gfs2/glock.h | 1 + fs/gfs2/incore.h | 1 + fs/gfs2/rgrp.c | 10 ++++++++++ include/uapi/linux/gfs2_ondisk.h | 10 ---------- 4 files changed, 12 insertions(+), 10 deletions(-)fs/gfs2/glock.h +1
-0@@ -306,4 +306,5 @@ static inline void glock_clear_object(struct gfs2_glock *gl, void *object) spin_unlock(&gl->gl_lockref.lock); } +#endif /* __GLOCK_DOT_H__ */ fs/gfs2/incore.h +1
-0@@ -33,6 +33,7 @@ struct gfs2_trans;struct gfs2_jdesc ;struct gfs2_sbd ;struct lm_lockops ; +struct gfs2_rgrp_lvb ;typedef void (*gfs2_glop_bh_t ) (struct gfs2_glock *gl,unsigned int ret);fs/gfs2/rgrp.c +10
-0@@ -46,6 +46,16 @@#define LBITSKIP00 (0x0000000000000000UL)#endif +struct gfs2_rgrp_lvb { +__be32 rl_magic; +__be32 rl_flags; +__be32 rl_free; +__be32 rl_dinodes; +__be64 rl_igeneration; +__be32 rl_unlinked; +__be32 __pad; +}; +/* * These routines are used by the resource group routines (rgrp.c) * to keep track of block allocation. Each block is represented by two include/uapi/linux/gfs2_ondisk.h +0
-10@@ -171,16 +171,6 @@ struct gfs2_rindex {#define GFS2_RGF_NOALLOC 0x00000008#define GFS2_RGF_TRIMMED 0x00000010 -struct gfs2_rgrp_lvb { -__be32 rl_magic; -__be32 rl_flags; -__be32 rl_free; -__be32 rl_dinodes; -__be64 rl_igeneration; -__be32 rl_unlinked; -__be32 __pad; -}; -struct gfs2_rgrp {struct gfs2_meta_header rg_header;
Andreas Gruenbacher
maintainerPATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
Quoted 7 lines · Steven Whitehouse
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
I can see a point in that. The reason I've posted this is because Bob was complaining that changes to include/uapi/linux/gfs2_ondisk.h break his out-of-tree module build process. (One of the patches I'm working on adds an inode LVB.) The same would be true of on-disk format changes as well of course, and those definitely need to be shared with user space. I'm not usually building gfs2 out of tree, so I'm indifferent to this change.
Thanks,
Andreas
PATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
Hi,
Quoted 15 lines · Andreas Gruenbacher
Quoted 6 lines · Steven Whitehouse
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
I can see a point in that. The reason I've posted this is because Bob was complaining that changes to
include/uapi/linux/gfs2_ondisk.hbreak his out-of-tree module build process. (One of the patches I'm working on adds an inode LVB.) The same would be true of on-disk format changes as well of course, and those definitely need to be shared with user space. I'm not usually building gfs2 out of tree, so I'm indifferent to this change.
Quoted 3 lines
Thanks,
Andreas
Why would we need to be able to build gfs2 (at least I assume it is gfs2) out of tree anyway?
Steve.
PATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
----- Original Message -----
Quoted 19 lines
Hi,
Quoted 16 lines · Andreas Gruenbacher
Quoted 6 lines · Steven Whitehouse
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
I can see a point in that. The reason I've posted this is because Bob was complaining that changes to
include/uapi/linux/gfs2_ondisk.hbreak his out-of-tree module build process. (One of the patches I'm working on adds an inode LVB.) The same would be true of on-disk format changes as well of course, and those definitely need to be shared with user space. I'm not usually building gfs2 out of tree, so I'm indifferent to this change.
Quoted 7 lines
Quoted 3 lines
Thanks,
AndreasWhy would we need to be able to build gfs2 (at least I assume it is gfs2) out of tree anyway?
Steve.
Simply for productivity. The difference is this procedure, which literally takes 10 seconds, if done simultaneously on all nodes using something like cssh:
make -C /usr/src/kernels/4.18.0-165.el8.x86_64 modules M=$PWD rmmod gfs2
insmod gfs2.ko
Compared to a procedure like this, which takes at least 30 minutes:
make (a new kernel .src.rpm)
scp or rsync the .src.rpm to a build machine
cd ~/rpmbuild/
rpm --force -i --nodeps /home/bob/*kernel-4.18.0*.src.rpm &> /dev/null echo $?
rpmbuild --target=x86_64 -ba SPECS/kernel.spec
( -or- submit a "real" kernel build)
then wait for the kernel build
Pull down all necessary kernel rpms
scp <those rpms> to all the nodes in the cluster
rpm --force -i --nodeps <those rpms>/sbin/reboot all the nodes in the cluster
wait for all the nodes to reboot, the cluster to stabilize, etc.
Regards,
Bob Peterson
Red Hat File Systems
PATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
Quoted 26 lines · Bob Peterson
----- Original Message -----
Quoted 25 lines
Hi,
Quoted 16 lines · Andreas Gruenbacher
Quoted 6 lines · Steven Whitehouse
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
I can see a point in that. The reason I've posted this is because Bob was complaining that changes to
include/uapi/linux/gfs2_ondisk.hbreak his out-of-tree module build process. (One of the patches I'm working on adds an inode LVB.) The same would be true of on-disk format changes as well of course, and those definitely need to be shared with user space. I'm not usually building gfs2 out of tree, so I'm indifferent to this change.Quoted 3 lines
Thanks,
AndreasWhy would we need to be able to build gfs2 (at least I assume it is gfs2) out of tree anyway?
Quoted 6 lines
Quoted 1 line
Steve.
Simply for productivity. The difference is this procedure, which literally takes 10 seconds, if done simultaneously on all nodes using something like cssh:
make -C
/usr/src/kernels/4.18.0-165.el8.x86_64modules M=$PWD
I'd be concerned about this generating "chimera" modules that produce invalid test results.
Quoted 5 lines
rmmod gfs2
insmod gfs2.koCompared to a procedure like this, which takes at least 30 minutes:
Quoted 13 lines
make (a new kernel .src.rpm)
scp or rsync the .src.rpm to a build machine
cd ~/rpmbuild/
rpm --force -i --nodeps/home/bob/*kernel-4.18.0*.src.rpm&>/dev/nullecho $?
rpmbuild --target=x86_64 -ba SPECS/kernel.spec
( -or- submit a "real" kernel build)
then wait for the kernel build
Pull down all necessary kernel rpms
scp <those rpms> to all the nodes in the cluster
rpm --force -i --nodeps <those rpms>/sbin/rebootall the nodes in the cluster
wait for all the nodes to reboot, the cluster to stabilize, etc.
Isn't the next-best alternative just building the modules in-tree and copying them to the test machines? I'm not sure I understand the complication.
Perhaps we need cluster_install and cluster_modules_install rules in the build system :)
Andy
PATCH 1/1 Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h
In reply to Steven WhitehouseQuoted 9 lines · Steven Whitehouse
Hi,
Quoted 2 lines · Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space.
The reason that is in ondisk is that changing that structure is something that needs to follow the same rules as changing the on disk structures. So it is there as a reminder of that,
Perhaps some eye-catching code comments would suffice? Defining it in a uapi header does sort-of communicate that it's ok to use in userspace, whereas just having the structs in close proximity doesn't really communicate that they should be updated in sync.
Andy
Quoted 76 lines
Quoted 10 lines
Signed-off-by Andreas Gruenbacher <[email protected]>---
? fs/gfs2/glock.h????????????????? |? 1 + ? fs/gfs2/incore.h???????????????? |? 1 + ? fs/gfs2/rgrp.c?????????????????? | 10 ++++++++++ ? include/uapi/linux/gfs2_ondisk.h | 10 ----------? 4 files changed, 12 insertions(+), 10 deletions(-)
Steve.
Quoted 61 lines
fs/gfs2/glock.h +1
-0@@ -306,4 +306,5 @@ static inline void glock_clear_object(struct gfs2_glock *gl, void *object) ????? spin_unlock(&gl->gl_lockref.lock); ? } +? #endif /*
__GLOCK_DOT_H__*/fs/gfs2/incore.h +1
-0@@ -33,6 +33,7 @@ struct gfs2_trans; ? struct gfs2_jdesc; ? struct gfs2_sbd; ? struct lm_lockops; +struct gfs2_rgrp_lvb ;? typedef void (
*gfs2_glop_bh_t) (structgfs2_glock*gl, unsigned int ret);fs/gfs2/rgrp.c +0
-0@@ -46,6 +46,16 @@ ? #define LBITSKIP00 (0x0000000000000000UL)? #endif
fs/gfs2/rgrp.c +10
-0+struct gfs2_rgrp_lvb { +??? __be32 rl_magic; +??? __be32 rl_flags; +??? __be32 rl_free; +??? __be32 rl_dinodes; +??? __be64 rl_igeneration; +??? __be32 rl_unlinked; +??? __be32 __pad; +}; +? /*
?? * These routines are used by the resource group routines (rgrp.c) ?? * to keep track of block allocation.? Each block is represented by twoinclude/uapi/linux/gfs2_ondisk.h +0
-0@@ -171,16 +171,6 @@ struct gfs2_rindex {? #define
GFS2_RGF_NOALLOC???0x00000008
? #defineGFS2_RGF_TRIMMED???0x00000010include/uapi/linux/gfs2_ondisk.h +0
-10-struct gfs2_rgrp_lvb { -??? __be32 rl_magic; -??? __be32 rl_flags; -??? __be32 rl_free; -??? __be32 rl_dinodes; -??? __be64 rl_igeneration; -??? __be32 rl_unlinked; -??? __be32 __pad; -}; -? struct
gfs2_rgrp{
????? structgfs2_meta_headerrg_header;