projects
/
platform
/
upstream
/
f2fs-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b51f80
)
mkfs.f2fs: reset sequential zones on device discard
author
Damien Le Moal
<damien.lemoal@wdc.com>
Fri, 28 Oct 2016 07:57:02 +0000
(16:57 +0900)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 2 Nov 2016 00:27:35 +0000
(17:27 -0700)
For a zoned blocks device, trim must reset all sequential zones
of the device.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
mkfs/f2fs_format_utils.c
patch
|
blob
|
history
diff --git
a/mkfs/f2fs_format_utils.c
b/mkfs/f2fs_format_utils.c
index
ba93308
..
d204bd4
100644
(file)
--- a/
mkfs/f2fs_format_utils.c
+++ b/
mkfs/f2fs_format_utils.c
@@
-58,6
+58,8
@@
int f2fs_trim_device(int fd, u_int64_t bytes)
#endif
return 0;
} else if (S_ISBLK(stat_buf.st_mode)) {
+ if (c.zoned_mode)
+ return f2fs_reset_zones();
#ifdef BLKSECDISCARD
if (ioctl(fd, BLKSECDISCARD, &range) < 0) {
MSG(0, "Info: This device doesn't support BLKSECDISCARD\n");