On Fri, Apr 3, 2020 at 9:38 AM Chengguang Xu <cgxu519@xxxxxxxxxxxx> wrote: > > ---- 在 星期五, 2020-04-03 10:46:52 Amir Goldstein <amir73il@xxxxxxxxx> 撰写 ---- > > On Thu, Apr 2, 2020 at 11:58 AM Chengguang Xu <cgxu519@xxxxxxxxxxxx> wrote: > > > > > > Sharing inode with different whiteout files for saving > > > inode and speeding up delete opration. > > > > > > Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx> > > > --- > > > > > > Hi Miklos, Amir > > > > > > This is another inode sharing approach for whiteout files compare > > > to Tao's previous patch. I didn't receive feedback from Tao for > > > further update and this new approach seems more simple and reliable. > > > Could you have a look at this patch? > > > > > > > I like the simplification, but there are some parts of Tao's patch you > > removed without understanding they need to be restored. > > > > The main think you missed is that it is not safe to protect ofs->whiteout > > with i_mutex on workdir, because workdir in ovl_whiteout() can be > > one of 2 directories. > > This is the point were the discussion on V3 got derailed. > > > > I will try to work on a patch unifying index/work dirs to solve this > > problem, so you won't need to change anything in your patch, > > but it will depend on this prerequisite. > > As alternative, if you do not wish to wait for my patch, > > please see the check for (workdir == ofs->workdir) in Tao's patch. > > > > Hi Amir, > > Thanks for your review, the check is quite simple so I will add the check in V2 > and we can remove it after your patch get merged. I will also fix all nits below > in V2. > FYI, pushed my patches to https://github.com/amir73il/linux/commits/ovl-workdir still debugging some issue related to nfs export, but I don't expect your patch will need to be merged before that. Feel free to test with my patches. Thanks, Amir.