io blksize problem with cifs
0 answers - 1941 bytes -

For cifs the preferred read size would be 16K, the preferred write size is
56K (pointers 14 pages can fit in cifs's iovec) - there are a few older
server which does not support large write (where 16K or in the case of
very old servers, 2K, would be preferred).
Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
Dave Kleikamp <shaggy (AT) austin (DOT) ibm.com
09/19/2006 10:53 AM
To
Andrew Morton <akpm (AT) osdl (DOT) org>
cc
sbenni (AT) gmx (DOT) de, sfrench (AT) samba (DOT) org, "Theodore Ts'o" <tytso (AT) mit (DOT) edu>,
linux-cifs-client (AT) lists (DOT) samba.org
Subject
Re: [linux-cifs-client] Re: io blksize problem with cifs
a/fs/stat.c~
a/fs/stat.c
@@ -14,6 +14,7 @@
#include <linux/namei.h>
#include <linux/security.h>
#include <linux/syscalls.h>
+#include <linux/pagemap.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -32,7 +33,7 @@ void generic_fillattr(struct inode *inod
stat->ctime = inode->i_ctime;
stat->size = i_size_read(inode);
stat->blocks = inode->i_blocks;
- stat->blksize = inode->i_blksize;
+ stat->blksize = PAGE_CACHE_SIZE;
}
EXPRT_SYMBL(generic_fillattr);
Ted, how come that's not (1 << inode->i_blkbits)?
I'm not Ted, but it's probably because stat->blksize isn't really tied
to the file system's block size.
from STAT(2):
The st_blksize field gives the "preferred" blocksize for efficient
file
system I/ (Writing to a file in smaller chunks may cause an
ineffi-
cient read-modify-rewrite.)
PAGE_CACHE_SIZE seems a reasonable default. The file system is free to
overwrite this after calling generic_fillattr().