projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9234f31
)
f2fs: call write_checkpoint under disabled gc
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Mon, 27 Oct 2014 18:04:35 +0000
(11:04 -0700)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:37 +0000
(16:07 -0800)
During the write_checkpoint, we should avoid f2fs_gc trigger to avoid any
filesystem consistency.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/segment.c
b/fs/f2fs/segment.c
index 21ccc481647481f0d20f23258f67fdac9c549285..d391a5913c792a06f0c80f68ee8ffa1da7bb0fb7 100644
(file)
--- a/
fs/f2fs/segment.c
+++ b/
fs/f2fs/segment.c
@@
-1046,7
+1046,9
@@
int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range)
cpc.trim_minlen = range->minlen >> sbi->log_blocksize;
/* do checkpoint to issue discard commands safely */
+ mutex_lock(&sbi->gc_mutex);
write_checkpoint(sbi, &cpc);
+ mutex_unlock(&sbi->gc_mutex);
out:
range->len = cpc.trimmed << sbi->log_blocksize;
return 0;