diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2018-05-15 13:21:48 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-16 08:50:16 -0700 |
commit | f7664b31975bd893190708e76b2c424328f0c49b (patch) | |
tree | 439142f0401d795c31bfbebe62f42b7e057fa446 /fs/xfs/libxfs/xfs_sb.h | |
parent | 62750d040bd137fd6f541e216502d9158e07d348 (diff) | |
download | linux-f7664b31975bd893190708e76b2c424328f0c49b.tar.bz2 |
xfs: implement online get/set fs label
The GET ioctl is trivial, just return the current label.
The SET ioctl is more involved:
It transactionally modifies the superblock to write a new filesystem
label to the primary super.
A new variant of xfs_sync_sb then writes the superblock buffer
immediately to disk so that the change is visible from userspace.
It then invalidates any page cache that userspace might have previously
read on the block device so that i.e. blkid can see the change
immediately, and updates all secondary superblocks as userspace relable
does.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
[darrick: use dchinner's new xfs_update_secondary_sbs function]
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_sb.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_sb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.h b/fs/xfs/libxfs/xfs_sb.h index fc65d4e1433a..03e0cc6bf3a6 100644 --- a/fs/xfs/libxfs/xfs_sb.h +++ b/fs/xfs/libxfs/xfs_sb.h @@ -36,6 +36,7 @@ extern int xfs_initialize_perag_data(struct xfs_mount *, xfs_agnumber_t); extern void xfs_log_sb(struct xfs_trans *tp); extern int xfs_sync_sb(struct xfs_mount *mp, bool wait); +extern int xfs_sync_sb_buf(struct xfs_mount *mp); extern void xfs_sb_mount_common(struct xfs_mount *mp, struct xfs_sb *sbp); extern void xfs_sb_from_disk(struct xfs_sb *to, struct xfs_dsb *from); extern void xfs_sb_to_disk(struct xfs_dsb *to, struct xfs_sb *from); |