Skip to content

Commit f4f36ff

Browse files
bagasmeJaegeuk Kim
authored andcommitted
Documentation: f2fs: Wrap snippets in literal code blocks
Compression mode code and device aliasing shell snippets are shown in htmldocs output as long-running paragraph instead. Wrap them. Fixes: 602a16d ("f2fs: add compress_mode mount option") Fixes: 128d333 ("f2fs: introduce device aliasing file") Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent f9c97e4 commit f4f36ff

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

Documentation/filesystems/f2fs.rst

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -953,15 +953,15 @@ target file and the timing. The user can do manual compression/decompression on
953953
compression enabled files using F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE
954954
ioctls like the below.
955955

956-
To decompress a file,
956+
To decompress a file::
957957

958-
fd = open(filename, O_WRONLY, 0);
959-
ret = ioctl(fd, F2FS_IOC_DECOMPRESS_FILE);
958+
fd = open(filename, O_WRONLY, 0);
959+
ret = ioctl(fd, F2FS_IOC_DECOMPRESS_FILE);
960960

961-
To compress a file,
961+
To compress a file::
962962

963-
fd = open(filename, O_WRONLY, 0);
964-
ret = ioctl(fd, F2FS_IOC_COMPRESS_FILE);
963+
fd = open(filename, O_WRONLY, 0);
964+
ret = ioctl(fd, F2FS_IOC_COMPRESS_FILE);
965965

966966
NVMe Zoned Namespace devices
967967
----------------------------
@@ -991,32 +991,32 @@ reserved and used by another filesystem or for different purposes. Once that
991991
external usage is complete, the device aliasing file can be deleted, releasing
992992
the reserved space back to F2FS for its own use.
993993

994-
<use-case>
995-
996-
# ls /dev/vd*
997-
/dev/vdb (32GB) /dev/vdc (32GB)
998-
# mkfs.ext4 /dev/vdc
999-
# mkfs.f2fs -c /dev/vdc@vdc.file /dev/vdb
1000-
# mount /dev/vdb /mnt/f2fs
1001-
# ls -l /mnt/f2fs
1002-
vdc.file
1003-
# df -h
1004-
/dev/vdb 64G 33G 32G 52% /mnt/f2fs
1005-
1006-
# mount -o loop /dev/vdc /mnt/ext4
1007-
# df -h
1008-
/dev/vdb 64G 33G 32G 52% /mnt/f2fs
1009-
/dev/loop7 32G 24K 30G 1% /mnt/ext4
1010-
# umount /mnt/ext4
1011-
1012-
# f2fs_io getflags /mnt/f2fs/vdc.file
1013-
get a flag on /mnt/f2fs/vdc.file ret=0, flags=nocow(pinned),immutable
1014-
# f2fs_io setflags noimmutable /mnt/f2fs/vdc.file
1015-
get a flag on noimmutable ret=0, flags=800010
1016-
set a flag on /mnt/f2fs/vdc.file ret=0, flags=noimmutable
1017-
# rm /mnt/f2fs/vdc.file
1018-
# df -h
1019-
/dev/vdb 64G 753M 64G 2% /mnt/f2fs
994+
.. code-block::
995+
996+
# ls /dev/vd*
997+
/dev/vdb (32GB) /dev/vdc (32GB)
998+
# mkfs.ext4 /dev/vdc
999+
# mkfs.f2fs -c /dev/vdc@vdc.file /dev/vdb
1000+
# mount /dev/vdb /mnt/f2fs
1001+
# ls -l /mnt/f2fs
1002+
vdc.file
1003+
# df -h
1004+
/dev/vdb 64G 33G 32G 52% /mnt/f2fs
1005+
1006+
# mount -o loop /dev/vdc /mnt/ext4
1007+
# df -h
1008+
/dev/vdb 64G 33G 32G 52% /mnt/f2fs
1009+
/dev/loop7 32G 24K 30G 1% /mnt/ext4
1010+
# umount /mnt/ext4
1011+
1012+
# f2fs_io getflags /mnt/f2fs/vdc.file
1013+
get a flag on /mnt/f2fs/vdc.file ret=0, flags=nocow(pinned),immutable
1014+
# f2fs_io setflags noimmutable /mnt/f2fs/vdc.file
1015+
get a flag on noimmutable ret=0, flags=800010
1016+
set a flag on /mnt/f2fs/vdc.file ret=0, flags=noimmutable
1017+
# rm /mnt/f2fs/vdc.file
1018+
# df -h
1019+
/dev/vdb 64G 753M 64G 2% /mnt/f2fs
10201020
10211021
So, the key idea is, user can do any file operations on /dev/vdc, and
10221022
reclaim the space after the use, while the space is counted as /data.

0 commit comments

Comments
 (0)