[linux-cifs-client] Re: Stream vs. file copy

Steven French sfrench at us.ibm.com
Wed Feb 28 17:29:45 GMT 2007


> is there a way to distinguish in the CIFS protocol between a request for 

> file streaming ( to be displayed without saving) to file copy

Since streams look like files in almost all request I consider the primary 
issue caching on the client (vs. not going through the page cache)  but 
there is a secondary issue of whether "stream" like access would 
necessarily be sequential (and thus we could set the proper flag on 
NTCreateX on the client to "help" the server make the right readahead and 
block i/o decisions).

The Linux cifs client can control caching (or not) by mount (mount option 
"forcedirectio") - but it may be useful to extend this to allow the Linux 
CIFS client to recognize the direct i/o open flag (it makes the caching 
decision more granular).   The difficulty is that posix direct i/o does 
not require sequential i/o - so how would one express this in a posix 
application so the cifs client could recognize it.

Whether a particular handle has priority and how to specify this in posix 
is another interesting question - but it would certainly be possible to 
express this in a mount option which could be translated to a cifs 
protocol extensions (as we are doing for posix/unix extensions now) on 
tree connect or setfileinfo/setpathinfo

If you have a proposal for how to express this we could consider adding 
this both the Linux client implementation as an option and/or to the 
protocol extension proposal.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com


More information about the linux-cifs-client mailing list