Re: [PATCH v5 7/8] fat (exportfs): rebuild directory-inode if fat_dget() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

>>> Although checking several routines to check hang case you said, I
>>> didn't find anything.
>>> And There is no any race on test result also. Am I missing something ?
>>> Let me know your opinion.
>>
>> Hm, it's read-only. So, there may not be race for now, I'm sure there is
>> race on write path though.
> Yes, right. We checked/tested on read-only.
> Maybe have you found race with rename and unlink ?
> If yes, I think we can fix this issue with lock like this.
>
> +                       mutex_lock(&MSDOS_SB(sb)->s_lock);
>                          parent_inode = fat_rebuild_parent(sb, parent_logstart);
> +                       mutex_unlock(&MSDOS_SB(sb)->s_lock);

It is any changes to directory. ->s_lock is not preferred. We need only
per-directory lock (i.e. dir->i_mutex).

To do this, we need more bigger changes though. E.g. register temporary
inode to central list. Then, find it when building real inode. If found
temporary, grab it, and make update it as real inode.

Yes, this is a bit complex. But we would need something like this for
write support.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux