From: "Steven J. Magnani" <steve@digidescorp.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: Fix non-atomic NFS i_pos read
Date: Fri, 29 Jun 2012 13:19:34 -0500 [thread overview]
Message-ID: <1340993974.9826.4.camel@iscandar.digidescorp.com> (raw)
In-Reply-To: <877guqt2kf.fsf@devron.myhome.or.jp>
On Sat, 2012-06-30 at 03:06 +0900, OGAWA Hirofumi wrote:
> "Steven J. Magnani" <steve@digidescorp.com> writes:
>
> > fat_encode_fh() can fetch an invalid i_pos value on systems
> > where 64-bit accesses are not atomic. Make it use the same
> > accessor as the rest of the FAT code.
> >
> > Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
> > ---
> > diff -uprN linux-3.5-rc4/fs/fat/inode.c new/fs/fat/inode.c
> > --- linux-3.5-rc4/fs/fat/inode.c 2012-06-29 11:20:12.781348652 -0500
> > +++ new/fs/fat/inode.c 2012-06-29 11:25:29.484713183 -0500
> > @@ -738,22 +738,22 @@ static int
> > fat_encode_fh(struct inode *inode, __u32 *fh, int *lenp, struct inode *parent)
> > {
> > int len = *lenp;
> > - u32 ipos_h, ipos_m, ipos_l;
> > + struct super_block *sb = inode->i_sb;
> > + struct msdos_sb_info *sbi = MSDOS_SB(sb);
>
> sb seems to be unused. So, we can just
>
> struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
>
> true? Otherwise, ack.
OK, I'll repost with that change.
>
> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>
> Just curious, this happened on the real system? I recently heard about
> NFS issue.
Not that I'm aware of. Can you point me to any discussion of the NFS
issue? I've spent a lot of time recently studying the FAT NFS
implementation and come to the conclusion that it is extremely
vulnerable to inode eviction. More to follow...
Regards,
Steve
next prev parent reply other threads:[~2012-06-29 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 17:19 [PATCH] fat: Fix non-atomic NFS i_pos read Steven J. Magnani
2012-06-29 18:06 ` OGAWA Hirofumi
2012-06-29 18:19 ` Steven J. Magnani [this message]
2012-06-29 18:53 ` OGAWA Hirofumi
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=1340993974.9826.4.camel@iscandar.digidescorp.com \
--to=steve@digidescorp.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
/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