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 v6 4/7] fat: restructure export_operations
Date: Mon, 18 Feb 2013 20:06:31 +0900 [thread overview]
Message-ID: <87fw0t3mq0.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1360422145-12280-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Sun, 10 Feb 2013 00:02:25 +0900")
Namjae Jeon <linkinjeon@gmail.com> writes:
> + if (MSDOS_SB(inode->i_sb)->options.nfs == FAT_NFS_NOSTALE_RO) {
> + if (inode->i_ino == MSDOS_ROOT_INO)
> + stat->ino = MSDOS_ROOT_INO;
Can we simply set i_pos = MSDOS_ROOT_INO in fat_read_root()? If so, I
think we can avoid this check.
> + else
> + /* Use i_pos for ino. This is used as fileid of nfs. */
> + stat->ino = fat_i_pos_read(MSDOS_SB(inode->i_sb),
> + inode);
> + }
> return 0;
> }
> EXPORT_SYMBOL_GPL(fat_getattr);
> +struct fat_fid {
> + u32 i_gen;
> + u32 i_pos_low;
> + u16 i_pos_hi;
> + u16 parent_i_pos_hi;
> + u32 parent_i_pos_low;
> + u32 parent_i_gen;
> +} __packed;
Do we need to use __packed? Unnecessary __packed can generate slower
code for alignment check on arch has unaligned fault.
> + if (parent && (len < FAT_FID_SIZE_WITH_PARENT)) {
> + *lenp = FAT_FID_SIZE_WITH_PARENT;
> + return 255;
> + } else if (len < FAT_FID_SIZE_WITHOUT_PARENT) {
> + *lenp = FAT_FID_SIZE_WITHOUT_PARENT;
> + return 255;
> + }
This check strange. "parent && len == FAT_FID_SIZE_WITHOUT_PARENT" will
overwrite over limit of fh size?
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2013-02-18 11:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 15:02 [PATCH v6 4/7] fat: restructure export_operations Namjae Jeon
2013-02-18 11:06 ` OGAWA Hirofumi [this message]
2013-02-18 11:42 ` OGAWA Hirofumi
2013-02-18 14:05 ` Namjae Jeon
2013-02-18 14:03 ` Namjae Jeon
2013-02-18 14:38 ` OGAWA Hirofumi
2013-02-18 14:49 ` 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=87fw0t3mq0.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