2018-10-24 08:10:33

by Yunlong Song

[permalink] [raw]
Subject: [PATCH] f2fs: remove codes of unused wio_mutex

Signed-off-by: Yunlong Song <[email protected]>
---
fs/f2fs/f2fs.h | 1 -
fs/f2fs/super.c | 5 +----
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 56204a8..4dfa28d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1170,7 +1170,6 @@ struct f2fs_sb_info {

/* for bio operations */
struct f2fs_bio_info *write_io[NR_PAGE_TYPE]; /* for write bios */
- struct mutex wio_mutex[NR_PAGE_TYPE - 1][NR_TEMP_TYPE];
/* bio ordering for NODE/DATA */
/* keep migration IO order for LFS mode */
struct rw_semaphore io_order_lock;
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index af58b2c..2d18de5 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2674,7 +2674,7 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi)
static void init_sb_info(struct f2fs_sb_info *sbi)
{
struct f2fs_super_block *raw_super = sbi->raw_super;
- int i, j;
+ int i;

sbi->log_sectors_per_block =
le32_to_cpu(raw_super->log_sectors_per_block);
@@ -2710,9 +2710,6 @@ static void init_sb_info(struct f2fs_sb_info *sbi)

INIT_LIST_HEAD(&sbi->s_list);
mutex_init(&sbi->umount_mutex);
- for (i = 0; i < NR_PAGE_TYPE - 1; i++)
- for (j = HOT; j < NR_TEMP_TYPE; j++)
- mutex_init(&sbi->wio_mutex[i][j]);
init_rwsem(&sbi->io_order_lock);
spin_lock_init(&sbi->cp_lock);

--
1.8.5.2



2018-10-24 09:33:36

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH] f2fs: remove codes of unused wio_mutex

On 2018/10/24 16:09, Yunlong Song wrote:
> Signed-off-by: Yunlong Song <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,


2018-12-12 03:52:11

by Yunlong Song

[permalink] [raw]
Subject: [PATCH v2] f2fs: remove codes of unused wio_mutex

v1->v2: delete comments in f2fs.h: "/* bio ordering for NODE/DATA */"

Signed-off-by: Yunlong Song <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
---
fs/f2fs/f2fs.h | 2 --
fs/f2fs/super.c | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 1e03197..195850e 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1170,8 +1170,6 @@ struct f2fs_sb_info {

/* for bio operations */
struct f2fs_bio_info *write_io[NR_PAGE_TYPE]; /* for write bios */
- struct mutex wio_mutex[NR_PAGE_TYPE - 1][NR_TEMP_TYPE];
- /* bio ordering for NODE/DATA */
/* keep migration IO order for LFS mode */
struct rw_semaphore io_order_lock;
mempool_t *write_io_dummy; /* Dummy pages */
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index af58b2c..2d18de5 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2674,7 +2674,7 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi)
static void init_sb_info(struct f2fs_sb_info *sbi)
{
struct f2fs_super_block *raw_super = sbi->raw_super;
- int i, j;
+ int i;

sbi->log_sectors_per_block =
le32_to_cpu(raw_super->log_sectors_per_block);
@@ -2710,9 +2710,6 @@ static void init_sb_info(struct f2fs_sb_info *sbi)

INIT_LIST_HEAD(&sbi->s_list);
mutex_init(&sbi->umount_mutex);
- for (i = 0; i < NR_PAGE_TYPE - 1; i++)
- for (j = HOT; j < NR_TEMP_TYPE; j++)
- mutex_init(&sbi->wio_mutex[i][j]);
init_rwsem(&sbi->io_order_lock);
spin_lock_init(&sbi->cp_lock);

--
1.8.5.2


2018-12-13 03:53:58

by Jaegeuk Kim

[permalink] [raw]
Subject: Re: [PATCH v2] f2fs: remove codes of unused wio_mutex

On 12/12, Yunlong Song wrote:
> v1->v2: delete comments in f2fs.h: "/* bio ordering for NODE/DATA */"

It's quite late for me to rebase the repo. Could you please send another patch
for this?

>
> Signed-off-by: Yunlong Song <[email protected]>
> Reviewed-by: Chao Yu <[email protected]>
> Signed-off-by: Jaegeuk Kim <[email protected]>
> ---
> fs/f2fs/f2fs.h | 2 --
> fs/f2fs/super.c | 5 +----
> 2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 1e03197..195850e 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1170,8 +1170,6 @@ struct f2fs_sb_info {
>
> /* for bio operations */
> struct f2fs_bio_info *write_io[NR_PAGE_TYPE]; /* for write bios */
> - struct mutex wio_mutex[NR_PAGE_TYPE - 1][NR_TEMP_TYPE];
> - /* bio ordering for NODE/DATA */
> /* keep migration IO order for LFS mode */
> struct rw_semaphore io_order_lock;
> mempool_t *write_io_dummy; /* Dummy pages */
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index af58b2c..2d18de5 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -2674,7 +2674,7 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi)
> static void init_sb_info(struct f2fs_sb_info *sbi)
> {
> struct f2fs_super_block *raw_super = sbi->raw_super;
> - int i, j;
> + int i;
>
> sbi->log_sectors_per_block =
> le32_to_cpu(raw_super->log_sectors_per_block);
> @@ -2710,9 +2710,6 @@ static void init_sb_info(struct f2fs_sb_info *sbi)
>
> INIT_LIST_HEAD(&sbi->s_list);
> mutex_init(&sbi->umount_mutex);
> - for (i = 0; i < NR_PAGE_TYPE - 1; i++)
> - for (j = HOT; j < NR_TEMP_TYPE; j++)
> - mutex_init(&sbi->wio_mutex[i][j]);
> init_rwsem(&sbi->io_order_lock);
> spin_lock_init(&sbi->cp_lock);
>
> --
> 1.8.5.2