[Samba] open(2) O_DIRECT on smbmount gives EINVAL

Andrew Chernow samba at esilo.com
Sun Oct 15 11:59:40 GMT 2006


 >>not in the server.
I am aware that we are talking about a client mount and not a samba server.  Did 
I post to the wrong list?  Is this for samba server questions?  That is the 
second time you mentioned the server although I never mentioned it?  Actually in 
my setup, there is no samba server.  There is a win2k box and a linux box.  I am 
trying to do directio from the linux box to the win2k box through a smb or cifs 
mount.

My goal is to have the metadata and data flushed out of the linux machine after 
each write/fs_transaction.  Whether the target machine on the network, in this 
case a win2k box, actually flushes that to disk, is not a requirement.  My only 
requirement is that the smb or cifs mount on the linux box does not buffer 
anything: reads, writes, find_files, mkdirs, etc...  Everything is flushed out 
to the target.

With that in mind, does the mount.cifs "directio" option meet this requirement. 
  Does the "directio" option behave/accomplish the same things as open(2)'s 
O_DIRECT or O_SYNC?  Is buffer alignment required when using mount.cifs's directio?

thanks,
andrew

Jeremy Allison wrote:
> On Sat, Oct 14, 2006 at 11:20:57PM -0400, Andrew Chernow wrote:
>> I tried this but got the same results, EINVAL?
>>
>> mount.cifs //machine/share /cifstest \
>>   -o username=xxx,password=xxx,directio,rw,noperm,soft
>>
>> Is the samba client utils, like smbmount and mount.cifs, supposed to 
>> support O_DIRECT?  There is mention of it in release notes, mostly samba4.  
>> Wondering if I need a patch or something.
> 
> It's something that needs to be supported in the client
> redirector code I think, not in the server.
> 
> Jeremy.
> 
> 


More information about the samba mailing list