[linux-cifs-client] Re: io blksize problem with cifs

Steven French sfrench at us.ibm.com
Tue Sep 19 16:30:28 GMT 2006


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.ibm.com> 
09/19/2006 10:53 AM

To
Andrew Morton <akpm at osdl.org>
cc
sbenni at gmx.de, sfrench at samba.org, "Theodore Ts'o" <tytso at mit.edu>, 
linux-cifs-client at lists.samba.org
Subject
Re: [linux-cifs-client] Re: io blksize problem with cifs




 
> --- 
a/fs/stat.c~inode-diet-eliminate-i_blksize-and-use-a-per-superblock-default
> +++ 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;
>  }
> 
>  EXPORT_SYMBOL(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/O.  (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().
-- 
David Kleikamp
IBM Linux Technology Center





More information about the linux-cifs-client mailing list