From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Namjae Jeon <namjae.jeon@samsung.com>,
Ravishankar N <ravi.n1@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH v5 7/8] fat (exportfs): rebuild directory-inode if fat_dget() fails
Date: Mon, 28 Jan 2013 22:51:38 +0900 [thread overview]
Message-ID: <87wquxpg9h.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <CAKYAXd-pNnnDBeTw4s05vMdmeTcBwMMT7L7=NNUj2vLxwHYWWg@mail.gmail.com> (Namjae Jeon's message of "Mon, 28 Jan 2013 16:43:56 +0900")
Namjae Jeon <linkinjeon@gmail.com> 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@mail.parknet.co.jp>
next prev parent reply other threads:[~2013-01-28 13:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 13:25 Namjae Jeon
2012-12-03 9:57 ` OGAWA Hirofumi
2012-12-04 6:27 ` Namjae Jeon
2012-12-04 9:31 ` OGAWA Hirofumi
2012-12-05 6:01 ` Namjae Jeon
2012-12-05 9:02 ` OGAWA Hirofumi
2012-12-05 11:56 ` Namjae Jeon
2012-12-15 10:52 ` Namjae Jeon
2012-12-19 16:10 ` OGAWA Hirofumi
2012-12-21 5:03 ` Namjae Jeon
2012-12-21 5:08 ` Namjae Jeon
2012-12-21 8:19 ` OGAWA Hirofumi
2012-12-21 10:15 ` Namjae Jeon
2012-12-21 10:35 ` OGAWA Hirofumi
2012-12-21 10:36 ` OGAWA Hirofumi
2013-01-09 6:24 ` Namjae Jeon
2013-01-20 11:06 ` OGAWA Hirofumi
2013-01-22 10:31 ` Namjae Jeon
2013-01-26 4:22 ` OGAWA Hirofumi
2013-01-28 7:43 ` Namjae Jeon
2013-01-28 13:51 ` OGAWA Hirofumi [this message]
2013-01-29 5:05 ` Namjae Jeon
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wquxpg9h.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=a.sahrawat@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linkinjeon@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
--cc=ravi.n1@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome