From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Theodore Tso <tytso@mit.edu>, Steve French <smfltc@us.ibm.com>
Subject: Re: [RFC/PATCH] - revert generic_fillattr stat->blksize to PAGE_CACHE_SIZE
Date: Mon, 06 Nov 2006 16:27:48 -0600 [thread overview]
Message-ID: <1162852069.11030.70.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <454FAE0A.3070409@redhat.com>
On Mon, 2006-11-06 at 15:50 -0600, Eric Sandeen wrote:
> The inode diet patches first did this to generic_fillattr():
>
> - stat->blksize = inode->i_blksize;
> + stat->blksize = PAGE_CACHE_SIZE;
>
> but by 2.6.19-rc3 this was changed again:
>
> - stat->blksize = PAGE_CACHE_SIZE;
> + stat->blksize = (1 << inode->i_blkbits);
>
> I can't find for sure why this was done; perhaps because it exposed a bug
> in cifs[1]
Steve has fixed the bug in cifs_readdir().
> However, if we are going to pick a default for generic_fillattr, it should probably
> be what most filesystems were using before, and let filesystems which need something
> else re-set it to according to their needs. As it stands today, doing readdirs and
> the like in block-sized chunks rather than page sized will probably not be the
> best thing for performance.
I agree.
>
> so I would propose the following patch to make PAGE_CACHE_SIZE the default (again),
> and let filesystems which need something -else- do that on their own.
>
> [1] http://lists.samba.org/archive/linux-cifs-client/2006-September/001481.html
>
> Thanks,
> -Eric
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> --- linux.orig/fs/stat.c 2006-11-05 23:27:04.962482569 -0600
> +++ linux/fs/stat.c 2006-11-05 23:27:29.394396050 -0600
> @@ -33,7 +33,7 @@
> stat->ctime = inode->i_ctime;
> stat->size = i_size_read(inode);
> stat->blocks = inode->i_blocks;
> - stat->blksize = (1 << inode->i_blkbits);
> + stat->blksize = PAGE_CACHE_SIZE;
> }
>
> EXPORT_SYMBOL(generic_fillattr);
Looks good. Since cifs is affected by this patch, I propose that cifs
explicitly set stat->blksize:
CIFS: Explicitly set stat->blksize
CIFS may perform I/O over the network in larger chunks than the page size,
so it should explicitly set stat->blksize to ensure optimal I/O bandwidth
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
diff -Nurp linux.orig/fs/cifs/inode.c linux/fs/cifs/inode.c
--- linux.orig/fs/cifs/inode.c 2006-11-03 13:44:04.000000000 -0600
+++ linux/fs/cifs/inode.c 2006-11-06 16:11:21.000000000 -0600
@@ -1089,8 +1089,10 @@ int cifs_getattr(struct vfsmount *mnt, s
struct kstat *stat)
{
int err = cifs_revalidate(dentry);
- if (!err)
+ if (!err) {
generic_fillattr(dentry->d_inode, stat);
+ stat->blksize = CIFS_MAX_MSGSIZE;
+ }
return err;
}
--
David Kleikamp
IBM Linux Technology Center
next prev parent reply other threads:[~2006-11-06 22:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 21:50 Eric Sandeen
2006-11-06 22:27 ` Dave Kleikamp [this message]
2006-11-06 22:37 ` Eric Sandeen
2006-11-07 0:26 ` Steve French
2006-11-07 13:40 ` Dave Kleikamp
2006-11-07 15:34 ` Dave Kleikamp
2006-11-07 15:50 ` Steve French
2006-11-06 23:05 ` Christoph Hellwig
2006-11-06 23:15 ` Eric Sandeen
2006-11-06 23:17 ` Christoph Hellwig
2006-11-06 23:28 ` Eric Sandeen
2006-11-07 0:08 ` Andreas Dilger
2006-11-07 0:13 ` Hua Zhong
2006-11-07 1:39 ` Eric Sandeen
2006-11-07 3:43 ` Theodore Tso
2006-11-07 4:02 ` Eric Sandeen
2006-12-03 13:21 col-pepper
2006-12-03 13:48 ` Adrian Bunk
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=1162852069.11030.70.camel@kleikamp.austin.ibm.com \
--to=shaggy@linux.vnet.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=smfltc@us.ibm.com \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®