summaryrefslogtreecommitdiff
path: root/fs/nilfs2/nilfs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@gmail.com>2024-08-15 16:44:07 +0900
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:43:34 -0700
commit4b901256a7bf6db3ca84ee2b2e87a1af4d40b8a3 (patch)
tree5aa63248077ca7b6e6d0f2e48c6d61210e8830e3 /fs/nilfs2/nilfs.h
parent8d1dba2e7cc74381087ae8ef03673abee758fcd0 (diff)
downloadlinux-4b901256a7bf6db3ca84ee2b2e87a1af4d40b8a3.tar.gz
linux-4b901256a7bf6db3ca84ee2b2e87a1af4d40b8a3.tar.bz2
linux-4b901256a7bf6db3ca84ee2b2e87a1af4d40b8a3.zip
nilfs2: add support for FS_IOC_GETFSLABEL
Implement support for FS_IOC_GETFSLABEL ioctl to read filesystem label. Link: https://lkml.kernel.org/r/20240815074408.5550-4-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/nilfs.h')
-rw-r--r--fs/nilfs2/nilfs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h
index 4017f7856440..3097490b6621 100644
--- a/fs/nilfs2/nilfs.h
+++ b/fs/nilfs2/nilfs.h
@@ -103,6 +103,18 @@ enum {
NILFS_SB_COMMIT_ALL /* Commit both super blocks */
};
+/**
+ * define NILFS_MAX_VOLUME_NAME - maximum number of characters (bytes) in a
+ * file system volume name
+ *
+ * Defined by the size of the volume name field in the on-disk superblocks.
+ * This volume name does not include the terminating NULL byte if the string
+ * length matches the field size, so use (NILFS_MAX_VOLUME_NAME + 1) for the
+ * size of the buffer that requires a NULL byte termination.
+ */
+#define NILFS_MAX_VOLUME_NAME \
+ sizeof_field(struct nilfs_super_block, s_volume_name)
+
/*
* Macros to check inode numbers
*/