archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <>
To: Li GuiFu <>
Subject: Re: [PATCH v2] erofs-utils: use qsort() to sort dir->i_subdirs
Date: Sun, 11 Apr 2021 22:41:03 +0800	[thread overview]
Message-ID: <20210411144047.GA15096@hsiangkao-HP-ZHAN-66-Pro-G1> (raw)
In-Reply-To: <>


On Sun, Apr 11, 2021 at 10:10:09PM +0800, Li GuiFu via Linux-erofs wrote:
> Hu Weiwen
>   It really do a high sort performance increase,
>   I have a idea that keeping the erofs_prepare_dir_file() function
> paramter stable, Using a independent function to do dirs sort.

I think Weiwen's implementation looks fine to me, if you tend to
not passing nr_subdirs as a cleaner solution, my suggestion would
1) introduce a somewhat erofs_subdirs, which includes
   - a list_head for all subdir dentries generated from d_alloc;
   - a nr_subdirs count;
2) update erofs_d_alloc to
   erofs_d_alloc(struct erofs_subdirs *, const char *);
3) update erofs_prepare_dir_file to
   erofs_prepare_dir_file(struct erofs_inode *, struct erofs_subdir *).

Yet I'd like to apply the current solution first since it helps the
dir creation performance. If someone has interest to the solution
above, new cleanup is always welcomed.

Reviewed-by: Gao Xiang <>

Gao Xiang

  reply	other threads:[~2021-04-11 14:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 13:52 [PATCH] " Hu Weiwen
2021-04-02  2:12 ` Gao Xiang
2021-04-02  2:17   ` Gao Xiang
2021-04-05  9:38     ` [PATCH v2] " Hu Weiwen
2021-04-05 11:24       ` Gao Xiang
2021-04-11 14:10       ` Li GuiFu via Linux-erofs
2021-04-11 14:41         ` Gao Xiang [this message]
2021-04-11 14:56           ` Li GuiFu via Linux-erofs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210411144047.GA15096@hsiangkao-HP-ZHAN-66-Pro-G1 \ \ \ \
    --subject='Re: [PATCH v2] erofs-utils: use qsort() to sort dir->i_subdirs' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).