public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH v2 0/3] exfat: remove duplicate write directory entries
       [not found] ` <SG2PR04MB3899752B10CFB6CF93A6127C81879@SG2PR04MB3899.apcprd04.prod.outlook.com>
@ 2022-07-21  0:36   ` Sungjong Seo
  2022-07-22  6:32   ` Namjae Jeon
  1 sibling, 0 replies; 2+ messages in thread
From: Sungjong Seo @ 2022-07-21  0:36 UTC (permalink / raw)
  To: 'linkinjeon'; +Cc: 'linux-fsdevel', 'linux-kernel'

> Changes for v2:
>   - [1/3]: Fix timing of calling __exfat_write_inode()
>     - __exfat_write_inode() should be called after updating inode.
>     - This call will be removed in [3/3], so the patch series is
>       no code changes between v1 and v2.
> 
> 
> These patches simplifie the code, and removes unnecessary writes for the
> following operations.

Looks good. Thanks.

Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>

> 
> 1. Write data to an empty file
>   * Preparation
>     ```
>     mkdir /mnt/dir;touch /mnt/dir/file;sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     dd if=/dev/zero of=/mnt/dir/file bs=${cluster_size} count=1
> oflag=append conv=notrunc
>     ```
>   * blktrace log
>     * Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    2        1    30.259435003   189  C   W 2628864 + 256 [0]
> /dir/file
>       179,3    0        2    30.264066003    84  C   W 2627584 + 1 [0]
> BitMap
>       179,3    2        2    30.261749337   189  C   W 2628608 + 1 [0]        /dir/
>       179,3    0        3    60.479159007    84  C   W 2628608 + 1 [0]        /dir/
>       ```
>     * After
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    3        1    30.185383337    87  C   W 2629888 + 256 [0]
> /dir/file
>       179,3    0        2    30.246422004    84  C   W 2627584 + 1 [0]
> BitMap
>       179,3    0        3    60.466497674    84  C   W 2628352 + 1 [0]        /dir/
>       ```
> 
> 2. Allocate a new cluster for a directory
>   * Preparation
>     ```
>     mkdir /mnt/dir
>     for ((i=1; i<cluster_size/96; i++)); do > /mnt/dir/file$i; done
>     mkdir /mnt/dir/dir1; sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     > /mnt/dir/file
>     ```
>   * blktrace log
>     - Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    2        1    30.263762003   189  C   W 2629504 + 128 [0]      /dir/
>       179,3    2        2    30.275596670   189  C   W 2629376 + 128 [0]      /dir/
>       179,3    2        3    30.290174003   189  C   W 2629119 + 1 [0]        /dir/
>       179,3    2        4    30.292362670   189  C   W 2628096 + 1 [0]        /
>       179,3    2        5    30.294547337   189  C   W 2627584 + 1 [0]
> BitMap
>       179,3    0        2    30.296661337    84  C   W 2625536 + 1 [0]
> FatArea
>       179,3    0        3    60.478775007    84  C   W 2628096 + 1 [0]        /
>       ```
>     - After
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    3        1    30.288114670    87  C   W 2631552 + 128 [0]      /dir/
>       179,3    3        2    30.303518003    87  C   W 2631424 + 128 [0]      /dir/
>       179,3    3        3    30.324212337    87  C   W 2631167 + 1 [0]        /dir/
>       179,3    3        4    30.326579003    87  C   W 2627584 + 1 [0]
> BitMap
>       179,3    0        2    30.328892670    84  C   W 2625536 + 1 [0]
> FatArea
>       179,3    0        3    60.503128674    84  C   W 2628096 + 1 [0]        /
>       ```
> 
> 3. Truncate and release cluster from the file
>   * Preparation
>     ```
>     mkdir /mnt/dir
>     dd if=/dev/zero of=/mnt/dir/file bs=${cluster_size} count=2
>     sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     truncate -s ${cluster_size} /mnt/dir/file
>     ```
> 
>   * blktrace log
>     * Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    1        1     5.048452334    49  C   W 2629120 + 1 [0]        /dir/
>       179,3    0        2     5.062994334    84  C   W 2627584 + 1 [0]        BitMap
>       179,3    0        3    10.031253002    84  C   W 2629120 + 1 [0]        /dir/
>       ```
> 
>      * After
>       ```
>       179,3    0        1     0.000000000  9143  C  WS 2623488 + 1 [0]
> BootArea
>       179,3    0        2    14.839244001  9143  C   W 2629888 + 1 [0]        /dir/
>       179,3    0        3    14.841562335  9143  C   W 2627584 + 1 [0]
> BitMap
>       ```
> 
> Yuezhang Mo (3):
>   exfat: reuse __exfat_write_inode() to update directory entry
>   exfat: remove duplicate write inode for truncating file
>   exfat: remove duplicate write inode for extending dir/file
> 
>  fs/exfat/exfat_fs.h |  1 +
>  fs/exfat/file.c     | 82 ++++++++++++++-------------------------------
>  fs/exfat/inode.c    | 41 ++++++-----------------
>  fs/exfat/namei.c    | 20 -----------
>  4 files changed, 37 insertions(+), 107 deletions(-)
> 
> --
> 2.25.1


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

* Re: [PATCH v2 0/3] exfat: remove duplicate write directory entries
       [not found] ` <SG2PR04MB3899752B10CFB6CF93A6127C81879@SG2PR04MB3899.apcprd04.prod.outlook.com>
  2022-07-21  0:36   ` [PATCH v2 0/3] exfat: remove duplicate write directory entries Sungjong Seo
@ 2022-07-22  6:32   ` Namjae Jeon
  1 sibling, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2022-07-22  6:32 UTC (permalink / raw)
  To: Yuezhang.Mo@sony.com
  Cc: sj1557.seo, linux-fsdevel, linux-kernel, Andy.Wu@sony.com,
	Wataru.Aoyama@sony.com

2022-07-11 18:29 GMT+09:00, Yuezhang.Mo@sony.com <Yuezhang.Mo@sony.com>:
> Changes for v2:
>   - [1/3]: Fix timing of calling __exfat_write_inode()
>     - __exfat_write_inode() should be called after updating inode.
>     - This call will be removed in [3/3], so the patch series is
>       no code changes between v1 and v2.
>
>
> These patches simplifie the code, and removes unnecessary writes for the
> following operations.
>
> 1. Write data to an empty file
>   * Preparation
>     ```
>     mkdir /mnt/dir;touch /mnt/dir/file;sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     dd if=/dev/zero of=/mnt/dir/file bs=${cluster_size} count=1 oflag=append
> conv=notrunc
>     ```
>   * blktrace log
>     * Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    2        1    30.259435003   189  C   W 2628864 + 256 [0]
>  /dir/file
>       179,3    0        2    30.264066003    84  C   W 2627584 + 1 [0]
>  BitMap
>       179,3    2        2    30.261749337   189  C   W 2628608 + 1 [0]
>  /dir/
>       179,3    0        3    60.479159007    84  C   W 2628608 + 1 [0]
>  /dir/
>       ```
>     * After
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    3        1    30.185383337    87  C   W 2629888 + 256 [0]
>  /dir/file
>       179,3    0        2    30.246422004    84  C   W 2627584 + 1 [0]
>  BitMap
>       179,3    0        3    60.466497674    84  C   W 2628352 + 1 [0]
>  /dir/
>       ```
>
> 2. Allocate a new cluster for a directory
>   * Preparation
>     ```
>     mkdir /mnt/dir
>     for ((i=1; i<cluster_size/96; i++)); do > /mnt/dir/file$i; done
>     mkdir /mnt/dir/dir1; sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     > /mnt/dir/file
>     ```
>   * blktrace log
>     - Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    2        1    30.263762003   189  C   W 2629504 + 128 [0]
>  /dir/
>       179,3    2        2    30.275596670   189  C   W 2629376 + 128 [0]
>  /dir/
>       179,3    2        3    30.290174003   189  C   W 2629119 + 1 [0]
>  /dir/
>       179,3    2        4    30.292362670   189  C   W 2628096 + 1 [0]
>  /
>       179,3    2        5    30.294547337   189  C   W 2627584 + 1 [0]
>  BitMap
>       179,3    0        2    30.296661337    84  C   W 2625536 + 1 [0]
>  FatArea
>       179,3    0        3    60.478775007    84  C   W 2628096 + 1 [0]
>  /
>       ```
>     - After
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    3        1    30.288114670    87  C   W 2631552 + 128 [0]
>  /dir/
>       179,3    3        2    30.303518003    87  C   W 2631424 + 128 [0]
>  /dir/
>       179,3    3        3    30.324212337    87  C   W 2631167 + 1 [0]
>  /dir/
>       179,3    3        4    30.326579003    87  C   W 2627584 + 1 [0]
>  BitMap
>       179,3    0        2    30.328892670    84  C   W 2625536 + 1 [0]
>  FatArea
>       179,3    0        3    60.503128674    84  C   W 2628096 + 1 [0]
>  /
>       ```
>
> 3. Truncate and release cluster from the file
>   * Preparation
>     ```
>     mkdir /mnt/dir
>     dd if=/dev/zero of=/mnt/dir/file bs=${cluster_size} count=2
>     sync
>     ```
>   * Capture the blktrace log of the following command
>     ```
>     truncate -s ${cluster_size} /mnt/dir/file
>     ```
>
>   * blktrace log
>     * Before
>       ```
>       179,3    0        1     0.000000000    84  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    1        1     5.048452334    49  C   W 2629120 + 1 [0]
>  /dir/
>       179,3    0        2     5.062994334    84  C   W 2627584 + 1 [0]
>  BitMap
>       179,3    0        3    10.031253002    84  C   W 2629120 + 1 [0]
>  /dir/
>       ```
>
>      * After
>       ```
>       179,3    0        1     0.000000000  9143  C  WS 2623488 + 1 [0]
>  BootArea
>       179,3    0        2    14.839244001  9143  C   W 2629888 + 1 [0]
>  /dir/
>       179,3    0        3    14.841562335  9143  C   W 2627584 + 1 [0]
>  BitMap
>       ```
>
> Yuezhang Mo (3):
>   exfat: reuse __exfat_write_inode() to update directory entry
>   exfat: remove duplicate write inode for truncating file
>   exfat: remove duplicate write inode for extending dir/file
>
>  fs/exfat/exfat_fs.h |  1 +
>  fs/exfat/file.c     | 82 ++++++++++++++-------------------------------
>  fs/exfat/inode.c    | 41 ++++++-----------------
>  fs/exfat/namei.c    | 20 -----------
>  4 files changed, 37 insertions(+), 107 deletions(-)

Applied, Thanks for your work!
>
> --
> 2.25.1
>

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

end of thread, other threads:[~2022-07-22  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20220711093004epcas1p4b7f4a4426c8d4f950631731156d95aa3@epcas1p4.samsung.com>
     [not found] ` <SG2PR04MB3899752B10CFB6CF93A6127C81879@SG2PR04MB3899.apcprd04.prod.outlook.com>
2022-07-21  0:36   ` [PATCH v2 0/3] exfat: remove duplicate write directory entries Sungjong Seo
2022-07-22  6:32   ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox