Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1465017 > unrolled thread
| Started by | Chao Yu <yuchao0@huawei.com> |
|---|---|
| First post | 2016-08-18 11:10 +0200 |
| Last post | 2016-08-18 11:50 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] f2fs: set dirty state for filesystem only when updating meta data Chao Yu <yuchao0@huawei.com> - 2016-08-18 11:10 +0200
Re: [PATCH] f2fs: set dirty state for filesystem only when updating meta data Chao Yu <yuchao0@huawei.com> - 2016-08-18 11:50 +0200
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Date | 2016-08-18 11:10 +0200 |
| Subject | [PATCH] f2fs: set dirty state for filesystem only when updating meta data |
| Message-ID | <s7ruN-66w-15@gated-at.bofh.it> |
We don't guarantee integrity of user data after checkpoint, since we only
guarantee meta data integrity for data consistency of filesystem.
Due to above reason, we only need to set fs as dirty when meta data is
updated, so that we can skip writing checkpoint in some case of non-meta
data is updated.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/f2fs.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 5a10bce..1659d10 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1220,7 +1220,9 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
{
percpu_counter_inc(&sbi->nr_pages[count_type]);
- set_sbi_flag(sbi, SBI_IS_DIRTY);
+ if (count_type == F2FS_DIRTY_DENTS || count_type == F2FS_DIRTY_NODES ||
+ count_type == F2FS_DIRTY_META)
+ set_sbi_flag(sbi, SBI_IS_DIRTY);
}
static inline void inode_inc_dirty_pages(struct inode *inode)
--
2.8.2.311.gee88674
[toc] | [next] | [standalone]
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Date | 2016-08-18 11:50 +0200 |
| Subject | Re: [PATCH] f2fs: set dirty state for filesystem only when updating meta data |
| Message-ID | <s7s7w-6mS-9@gated-at.bofh.it> |
| In reply to | #1465017 |
On 2016/8/18 17:05, Chao Yu wrote:
> We don't guarantee integrity of user data after checkpoint, since we only
> guarantee meta data integrity for data consistency of filesystem.
>
> Due to above reason, we only need to set fs as dirty when meta data is
> updated, so that we can skip writing checkpoint in some case of non-meta
> data is updated.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
> fs/f2fs/f2fs.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 5a10bce..1659d10 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1220,7 +1220,9 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
> static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type)
> {
> percpu_counter_inc(&sbi->nr_pages[count_type]);
> - set_sbi_flag(sbi, SBI_IS_DIRTY);
> + if (count_type == F2FS_DIRTY_DENTS || count_type == F2FS_DIRTY_NODES ||
> + count_type == F2FS_DIRTY_META)
Sorry, I miss one condition here, please ignore this patch.
Thanks,
> + set_sbi_flag(sbi, SBI_IS_DIRTY);
> }
>
> static inline void inode_inc_dirty_pages(struct inode *inode)
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web