OSDN Git Service

f2fs: detect wrong layout
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 5 Dec 2016 21:56:04 +0000 (13:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2019 08:42:47 +0000 (09:42 +0100)
commitb37804d039bf3417a2a5eb8840584be13a01f142
tree9f715938a11d6cc310198c8d02057bc5ba6f8c4a
parente465e93d88cb2a1c17a21acb35de5e589820844b
f2fs: detect wrong layout

commit 2040fce83fe17763b07c97c1f691da2bb85e4135 upstream.

Previous mkfs.f2fs allows small partition inappropriately, so f2fs should detect
that as well.

Refer this in f2fs-tools.

mkfs.f2fs: detect small partition by overprovision ratio and # of segments

Reported-and-Tested-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[bwh: Backported to 4.4: adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/segment.h
fs/f2fs/super.c