linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove an unnecessary line in allocate_data_block.
@ 2014-07-27 23:03 Dongho Sim
  2014-07-28  5:35 ` Chao Yu
  0 siblings, 1 reply; 8+ messages in thread
From: Dongho Sim @ 2014-07-27 23:03 UTC (permalink / raw)
  To: jaegeuk, linux-f2fs-devel

Hi. There was an unnecessary line in function, allocate_data_block.
It is already done in 
   refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);

Thanks.

Signed-off-by: Dongho Sim <dh.sim@samsung.com>
---
 fs/f2fs/segment.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8a6e57d..a3c7aae 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1001,7 +1001,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 	 * since SSR needs latest valid block information.
 	 */
 	refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
-	locate_dirty_segment(sbi, old_cursegno);
 
 	mutex_unlock(&sit_i->sentry_lock);
 
-- 
1.9.1
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH] Remove an unnecessary line in allocate_data_block.
@ 2014-07-28  5:51 Dongho Sim
  0 siblings, 0 replies; 8+ messages in thread
From: Dongho Sim @ 2014-07-28  5:51 UTC (permalink / raw)
  To: 俞超
  Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net

Yes, there was another one.
Thanks Chao, :-)

Signed-off-by: Dongho Sim <dh.sim@samsung.com>
---
 fs/f2fs/segment.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8a6e57d..3ab7749 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -980,7 +980,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 	mutex_lock(&curseg->curseg_mutex);
 
 	*new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
-	old_cursegno = curseg->segno;
 
 	/*
 	 * __add_sum_entry should be resided under the curseg_mutex
@@ -1001,7 +1000,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 	 * since SSR needs latest valid block information.
 	 */
 	refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
-	locate_dirty_segment(sbi, old_cursegno);
 
 	mutex_unlock(&sit_i->sentry_lock);
 
-- 
1.9.1

------- Original Message -------
Sender : 俞超<chao2.yu@samsung.com> 工程师/SRC-Nanjing-Mobile Solution Lab/삼성전자
Date : 2014-07-28 14:35 (GMT+09:00)
Title : RE: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.

Hi Dongho,

> -----Original Message-----
> From: Dongho Sim [mailto:dh.sim@samsung.com]
> Sent: Monday, July 28, 2014 7:03 AM
> To: jaegeuk@kernel.org; linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> 
> Hi. There was an unnecessary line in function, allocate_data_block.
> It is already done in
>    refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> 
> Thanks.

Agreed,
How about removing old_cursegno too as it's no longer used in allocate_data_block?

Thanks,
Yu

> 
> Signed-off-by: Dongho Sim 
> ---
>  fs/f2fs/segment.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 8a6e57d..a3c7aae 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -1001,7 +1001,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
>   * since SSR needs latest valid block information.
>   */
>   refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> - locate_dirty_segment(sbi, old_cursegno);
> 
>   mutex_unlock(&sit_i->sentry_lock);
> 
> --
> 1.9.1
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH] Remove an unnecessary line in allocate_data_block.
@ 2014-07-28  7:21 Chao Yu
  0 siblings, 0 replies; 8+ messages in thread
From: Chao Yu @ 2014-07-28  7:21 UTC (permalink / raw)
  To: dh.sim; +Cc: jaegeuk, linux-f2fs-devel

Hi Dongho,

> ----- Original Message -----
> 
> From: "Dongho Sim" <dh.sim@samsung.com>
> Sent: Monday, July 28, 2014 1:51 PM
> To: "Chao Yu" <chao2.yu@samsung.com>
> Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> 
> Yes, there was another one.
> Thanks Chao, :-)
> 
> Signed-off-by: Dongho Sim <dh.sim@samsung.com>
> ---
>  fs/f2fs/segment.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 8a6e57d..3ab7749 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -980,7 +980,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
>         mutex_lock(&curseg->curseg_mutex);
> 
>         *new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
> -       old_cursegno = curseg->segno;

The definition of old_cursegno also should be removed.

Thanks,
Yu

> 
>         /*
>          * __add_sum_entry should be resided under the curseg_mutex
> @@ -1001,7 +1000,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
>          * since SSR needs latest valid block information.
>          */
>         refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> -       locate_dirty_segment(sbi, old_cursegno);
> 
>         mutex_unlock(&sit_i->sentry_lock);
> 
> --
> 1.9.1
> 
> ------- Original Message -------
> Sender : Chao Yu <chao2.yu@samsung.com> 
> Date : 2014-07-28 14:35 (GMT+09:00)
> Title : RE: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> 
> Hi Dongho,
> 
> > -----Original Message-----
> > From: Dongho Sim [mailto:dh.sim@samsung.com]
> > Sent: Monday, July 28, 2014 7:03 AM
> > To: jaegeuk@kernel.org; linux-f2fs-devel@lists.sourceforge.net
> > Subject: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> >
> > Hi. There was an unnecessary line in function, allocate_data_block.
> > It is already done in
> >    refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> >
> > Thanks.
> 
> Agreed,
> How about removing old_cursegno too as it's no longer used in allocate_data_block?
> 
> Thanks,
> Yu
> 
> >
> > Signed-off-by: Dongho Sim
> > ---
> >  fs/f2fs/segment.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 8a6e57d..a3c7aae 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -1001,7 +1001,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
> >   * since SSR needs latest valid block information.
> >   */
> >   refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> > - locate_dirty_segment(sbi, old_cursegno);
> >
> >   mutex_unlock(&sit_i->sentry_lock);
> >
> > --
> > 1.9.1
> > ------------------------------------------------------------------------------
> > Want fast and easy access to all the code in your enterprise? Index and
> > search up to 200,000 lines of code with a free copy of Black Duck
> > Code Sight - the same software that powers the world's largest code
> > search on Ohloh, the Black Duck Open Hub! Try it now.
> > http://p.sf.net/sfu/bds
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH] Remove an unnecessary line in allocate_data_block.
@ 2014-07-28  8:34 Dongho Sim
  2014-07-29 13:24 ` Jaegeuk Kim
  0 siblings, 1 reply; 8+ messages in thread
From: Dongho Sim @ 2014-07-28  8:34 UTC (permalink / raw)
  To: ?超; +Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net

Hi, Chao.
It's my mistake.

Thanks :-)

Signed-off-by: Dongho Sim <dh.sim@samsung.com>
---
 fs/f2fs/segment.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8a6e57d..7af4a8d 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -973,14 +973,12 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 {
 	struct sit_info *sit_i = SIT_I(sbi);
 	struct curseg_info *curseg;
-	unsigned int old_cursegno;
 
 	curseg = CURSEG_I(sbi, type);
 
 	mutex_lock(&curseg->curseg_mutex);
 
 	*new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
-	old_cursegno = curseg->segno;
 
 	/*
 	 * __add_sum_entry should be resided under the curseg_mutex
@@ -1001,7 +999,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 	 * since SSR needs latest valid block information.
 	 */
 	refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
-	locate_dirty_segment(sbi, old_cursegno);
 
 	mutex_unlock(&sit_i->sentry_lock);
 
-- 
1.9.1

------- Original Message -------
Sender : ?超<chao2.yu@samsung.com> 工程?/SRC-Nanjing-Mobile Solution Lab/삼성전자
Date : 2014-07-28 16:21 (GMT+09:00)
Title : Re: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.

Hi Dongho,

> ----- Original Message -----
> 
> From: "Dongho Sim" 
> Sent: Monday, July 28, 2014 1:51 PM
> To: "Chao Yu" 
> Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> 
> Yes, there was another one.
> Thanks Chao, :-)
> 
> Signed-off-by: Dongho Sim 
> ---
>  fs/f2fs/segment.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 8a6e57d..3ab7749 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -980,7 +980,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
>         mutex_lock(&curseg->curseg_mutex);
> 
>         *new_blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
> -       old_cursegno = curseg->segno;

The definition of old_cursegno also should be removed.

Thanks,
Yu

> 
>         /*
>          * __add_sum_entry should be resided under the curseg_mutex
> @@ -1001,7 +1000,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
>          * since SSR needs latest valid block information.
>          */
>         refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> -       locate_dirty_segment(sbi, old_cursegno);
> 
>         mutex_unlock(&sit_i->sentry_lock);
> 
> --
> 1.9.1
> 
> ------- Original Message -------
> Sender : Chao Yu 
> Date : 2014-07-28 14:35 (GMT+09:00)
> Title : RE: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> 
> Hi Dongho,
> 
> > -----Original Message-----
> > From: Dongho Sim [mailto:dh.sim@samsung.com]
> > Sent: Monday, July 28, 2014 7:03 AM
> > To: jaegeuk@kernel.org; linux-f2fs-devel@lists.sourceforge.net
> > Subject: [f2fs-dev] [PATCH] Remove an unnecessary line in allocate_data_block.
> >
> > Hi. There was an unnecessary line in function, allocate_data_block.
> > It is already done in
> >    refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> >
> > Thanks.
> 
> Agreed,
> How about removing old_cursegno too as it's no longer used in allocate_data_block?
> 
> Thanks,
> Yu
> 
> >
> > Signed-off-by: Dongho Sim
> > ---
> >  fs/f2fs/segment.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 8a6e57d..a3c7aae 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -1001,7 +1001,6 @@ void allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
> >   * since SSR needs latest valid block information.
> >   */
> >   refresh_sit_entry(sbi, old_blkaddr, *new_blkaddr);
> > - locate_dirty_segment(sbi, old_cursegno);
> >
> >   mutex_unlock(&sit_i->sentry_lock);
> >
> > --
> > 1.9.1
> > ------------------------------------------------------------------------------
> > Want fast and easy access to all the code in your enterprise? Index and
> > search up to 200,000 lines of code with a free copy of Black Duck
> > Code Sight - the same software that powers the world's largest code
> > search on Ohloh, the Black Duck Open Hub! Try it now.
> > http://p.sf.net/sfu/bds
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-30  1:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-27 23:03 [PATCH] Remove an unnecessary line in allocate_data_block Dongho Sim
2014-07-28  5:35 ` Chao Yu
  -- strict thread matches above, loose matches on Subject: below --
2014-07-28  5:51 Dongho Sim
2014-07-28  7:21 Chao Yu
2014-07-28  8:34 Dongho Sim
2014-07-29 13:24 ` Jaegeuk Kim
2014-07-30  0:24   ` Changman Lee
2014-07-30  1:23     ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).