Re: [f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Chao Yu
Hi Dan, On 2018/8/7 19:19, Dan Carpenter wrote: > On Tue, Aug 07, 2018 at 06:52:45PM +0800, Chao Yu wrote: >> Hi Dan, >> >> Thanks for your report, let me try fixing this issue. >> >> Out of curiosity, the bug was introduced in __issue_discard_cmd_range() early >> instead of recent commit 20ee4382

[f2fs-dev] [PATCH] f2fs: fix use-after-free of dicard command entry

2018-08-07 Thread Chao Yu
As Dan Carpenter reported: The patch 20ee4382322c: "f2fs: issue small discard by LBA order" from Jul 8, 2018, leads to the following Smatch warning: fs/f2fs/segment.c:1277 __issue_discard_cmd_orderly() warn: 'dc' was already freed. See also: fs/f2fs/segment.c:2550 __issue_discard

[f2fs-dev] [PATCH v3] f2fs: checkpoint disabling

2018-08-07 Thread Daniel Rosenberg via Linux-f2fs-devel
This adds a lightweight non-persistent snapshotting scheme to f2fs. To use, mount with the option checkpoint=disable, and to return to normal operation, remount with checkpoint=enable. If the filesystem is shut down before remounting with checkpoint=enable, it will revert back to its apparent stat

Re: [f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Dan Carpenter
On Tue, Aug 07, 2018 at 06:52:45PM +0800, Chao Yu wrote: > Hi Dan, > > Thanks for your report, let me try fixing this issue. > > Out of curiosity, the bug was introduced in __issue_discard_cmd_range() early > instead of recent commit 20ee4382322c ("f2fs: issue small discard by LBA > order"), did

Re: [f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Chao Yu
Hi Dan, Thanks for your report, let me try fixing this issue. Out of curiosity, the bug was introduced in __issue_discard_cmd_range() early instead of recent commit 20ee4382322c ("f2fs: issue small discard by LBA order"), did Smatch missed to check original commit? Thanks, On 2018/8/7 16:17, Da

Re: [f2fs-dev] [RFC PATCH 3/3] f2fs-tools: introduce sb checksum

2018-08-07 Thread Chao Yu
On 2018/8/7 17:17, Junling Zheng wrote: > This patch introduced superblock checksum. > > Signed-off-by: Junling Zheng > --- > fsck/mount.c | 52 ++ > fsck/resize.c | 11 ++ > include/f2fs_fs.h | 6 +- > mkfs/f2fs_format.c | 9

Re: [f2fs-dev] [RFC PATCH 2/3] f2fs-tools: rename CHECKSUM_OFFSET to CHKSUM_OFFSET_CP

2018-08-07 Thread Chao Yu
On 2018/8/7 17:17, Junling Zheng wrote: > This patch renamed CHECKSUM_OFFSET to CHKSUM_OFFSET_CP. Hmm... How about CP_CHECKSUM_OFFSET? Thanks, -- Check out the vibrant tech community on one of the world's most engaging

Re: [f2fs-dev] [RFC PATCH v2 1/3] f2fs: support superblock checksum

2018-08-07 Thread Chao Yu
On 2018/8/7 17:39, Junling Zheng wrote: > Now we support crc32 checksum for superblock. > > Signed-off-by: Junling Zheng > --- > v1 -> v1: > - fix to switch endian of crc. > fs/f2fs/f2fs.h | 1 + > fs/f2fs/super.c | 28 > include/linux/f2fs_fs.h |

[f2fs-dev] [RFC PATCH v2 1/3] f2fs: support superblock checksum

2018-08-07 Thread Junling Zheng
Now we support crc32 checksum for superblock. Signed-off-by: Junling Zheng --- v1 -> v1: - fix to switch endian of crc. fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 28 include/linux/f2fs_fs.h | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-)

[f2fs-dev] [RFC PATCH] f2fs: support superblock checksum

2018-08-07 Thread Junling Zheng
Now we support crc32 checksum for superblock. Signed-off-by: Junling Zheng --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 28 include/linux/f2fs_fs.h | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs

[f2fs-dev] [RFC PATCH 3/3] f2fs-tools: introduce sb checksum

2018-08-07 Thread Junling Zheng
This patch introduced superblock checksum. Signed-off-by: Junling Zheng --- fsck/mount.c | 52 ++ fsck/resize.c | 11 ++ include/f2fs_fs.h | 6 +- mkfs/f2fs_format.c | 9 4 files changed, 77 insertions(+), 1 deletion(

[f2fs-dev] [RFC PATCH 2/3] f2fs-tools: rename CHECKSUM_OFFSET to CHKSUM_OFFSET_CP

2018-08-07 Thread Junling Zheng
This patch renamed CHECKSUM_OFFSET to CHKSUM_OFFSET_CP. Signed-off-by: Junling Zheng --- fsck/fsck.c| 4 ++-- fsck/mount.c | 4 ++-- fsck/resize.c | 8 include/f2fs_fs.h | 6 +++--- mkfs/f2fs_format.c | 14 +++--- 5 files changed, 18 insertions(+), 18 del

[f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Dan Carpenter
Hello Chao Yu, The patch 20ee4382322c: "f2fs: issue small discard by LBA order" from Jul 8, 2018, leads to the following Smatch warning: fs/f2fs/segment.c:1277 __issue_discard_cmd_orderly() warn: 'dc' was already freed. fs/f2fs/segment.c 1260 while (dc) { 1261