diff mbox series

[2/4] ocfs2: load global_inode_alloc

Message ID 20200616183829.87211-3-junxiao.bi@oracle.com (mailing list archive)
State New, archived
Headers show
Series [1/4] ocfs2: avoid inode removed while nfsd access it | expand

Commit Message

Junxiao Bi June 16, 2020, 6:38 p.m. UTC
set global_inode_alloc as OCFS2_FIRST_ONLINE_SYSTEM_INODE, that will make
it load during mount. It can be used to test whether some global/system
inodes are valid. One use case is that nfsd will test whether root inode
is valid.

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
 fs/ocfs2/ocfs2_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joseph Qi June 17, 2020, 3:03 a.m. UTC | #1
On 2020/6/17 02:38, Junxiao Bi wrote:
> set global_inode_alloc as OCFS2_FIRST_ONLINE_SYSTEM_INODE, that will make
> it load during mount. It can be used to test whether some global/system
> inodes are valid. One use case is that nfsd will test whether root inode
> is valid.
> 
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>

Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/ocfs2_fs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
> index 0dd8c41bafd4..3fc99659ed09 100644
> --- a/fs/ocfs2/ocfs2_fs.h
> +++ b/fs/ocfs2/ocfs2_fs.h
> @@ -326,8 +326,8 @@ struct ocfs2_system_inode_info {
>  enum {
>  	BAD_BLOCK_SYSTEM_INODE = 0,
>  	GLOBAL_INODE_ALLOC_SYSTEM_INODE,
> +#define OCFS2_FIRST_ONLINE_SYSTEM_INODE GLOBAL_INODE_ALLOC_SYSTEM_INODE
>  	SLOT_MAP_SYSTEM_INODE,
> -#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
>  	HEARTBEAT_SYSTEM_INODE,
>  	GLOBAL_BITMAP_SYSTEM_INODE,
>  	USER_QUOTA_SYSTEM_INODE,
>
diff mbox series

Patch

diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 0dd8c41bafd4..3fc99659ed09 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -326,8 +326,8 @@  struct ocfs2_system_inode_info {
 enum {
 	BAD_BLOCK_SYSTEM_INODE = 0,
 	GLOBAL_INODE_ALLOC_SYSTEM_INODE,
+#define OCFS2_FIRST_ONLINE_SYSTEM_INODE GLOBAL_INODE_ALLOC_SYSTEM_INODE
 	SLOT_MAP_SYSTEM_INODE,
-#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
 	HEARTBEAT_SYSTEM_INODE,
 	GLOBAL_BITMAP_SYSTEM_INODE,
 	USER_QUOTA_SYSTEM_INODE,