Bug 8761 - vfs_gpfs with gpfs 3.4.0-10 and above: clients can't create new files
vfs_gpfs with gpfs 3.4.0-10 and above: clients can't create new files
Status: RESOLVED WONTFIX
Product: Samba 3.6
Classification: Unclassified
Component: VFS Modules
3.6.3
All Linux
: P5 major
: ---
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-14 15:18 UTC by Heiner Billich
Modified: 2012-02-14 16:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiner Billich 2012-02-14 15:18:47 UTC
With GPFS 3.4.0-10 and 3.4.0-11 on Redhat 5.7 and samba 3.6.3 Windows clients can no longer create new files on shares with vfs_gpfs enabled. vfs_gpfs_get_real_filename() returns "Bad address", which probably causes the error. I see the same with samba 3.5.12. I did recompile samba 3.6.3 with gpfs 3.4.0-11 to ensure that I get the right headers, still no luck, the error stays.

Since gpfs 3.4.0-10 gpfs_reafilename_path_fn()  does no longer set errno=2(ENOSYS?) if a file does not exist but sets errno=14. I guess that this triggers this issue.
 

The client (Windows 2008R2 Server) tries to create a new file with the command

echo hello > test.txt


the samba log shows

[2012/02/14 14:20:30.507269,  4] smbd/uid.c:351(change_to_user)
  Skipping user change - already user
[2012/02/14 14:20:30.507316,  5] smbd/filename.c:257(unix_convert)
  unix_convert called on file "test.txt"
[2012/02/14 14:20:30.507343,  5] smbd/filename.c:416(unix_convert)
  unix_convert begin: name = test.txt, dirpath = , start = test.txt
[2012/02/14 14:20:30.507379, 10] modules/vfs_gpfs.c:152(vfs_gpfs_get_real_filename)
  smbd_gpfs_get_realfilename_path returned Bad address


smb.conf:

[global]
        guest account = smbguest
        netbios name = XBL-TEST-20
 
        workgroup = XBLTEST
        max protocol = SMB2
        min receivefile size = 131072

        log level =  5 vfs:20

[public]
        guest ok = yes
        guest only = yes
        path = /export/xbl2/Data/scratch/bench/test.d/cifs
        read only = no
        vfs objects = gpfs fileid
        fileid:mapping = fsname
        gpfs:sharemodes = No


I addes some more debug statements to the code to bracket the failing call to gpfs_get_realfilename_path_fn(): 



[2012/02/14 15:38:10.324041,  3] modules/gpfs.c:161(smbd_gpfs_get_realfilename_path)
  calling gpfs_get_realfilename_path_fn() with args pathname=/test.txt filename=BBBBBBBBBB... buflen=4096
[2012/02/14 15:38:10.324074,  3] modules/gpfs.c:163(smbd_gpfs_get_realfilename_path)
  called gpfs_get_realfilename_path_fn(), returned -1,  args pathname=/test.txt filename=BBBBBBBBBB... buflen=4096
[2012/02/14 15:38:10.324098, 10] modules/vfs_gpfs.c:152(vfs_gpfs_get_real_filename)
  smbd_gpfs_get_realfilename_path returned Bad address


Now when I do the same with GPFS 3.4.0-9 I get


[2012/02/14 15:41:21.271090,  5] smbd/filename.c:416(unix_convert)
  unix_convert begin: name = test.txt, dirpath = , start = test.txt
[2012/02/14 15:41:21.276993,  3] modules/gpfs.c:161(smbd_gpfs_get_realfilename_path)
  calling gpfs_get_realfilename_path_fn() with args pathname=/test.txt filename=BBBBBBBBBB buflen=4096
[2012/02/14 15:41:21.277041,  3] modules/gpfs.c:163(smbd_gpfs_get_realfilename_path)
  called gpfs_get_realfilename_path_fn(), returned -1,  args pathname=/test.txt filename=BBBBBBBBBB buflen=4096
[2012/02/14 15:41:21.277069, 10] modules/vfs_gpfs.c:152(vfs_gpfs_get_real_filename)
  smbd_gpfs_get_realfilename_path returned No such file or directory
[2012/02/14 15:41:21.277104,  5] smbd/filename.c:781(unix_convert)
  New file test.txt


So the call to gpfs_get_realfilename_path_fn() works the same and returns -1 as before, but the interpretation is different: with gpfs 3.4.0-9 I get "No such file or directory" but with gpfs 3.4.0-11 I get "Bad address"

It looks like gpfs_get_realfilename_path_fn() set "errno" to different values, I included errno in the debug output:


gpfs 3.4.0-9 working - errno=2

[2012/02/14 15:49:22.067993,  3] modules/gpfs.c:161(smbd_gpfs_get_realfilename_path)
  calling gpfs_get_realfilename_path_fn() with args pathname=/test.txt filename=         } buflen=4096
[2012/02/14 15:49:22.068041,  3] modules/gpfs.c:163(smbd_gpfs_get_realfilename_path)
  called gpfs_get_realfilename_path_fn(), returned -1 errno=2,  args pathname=/test.txt filename=         } buflen=4096
[2012/02/14 15:49:22.068068, 10] modules/vfs_gpfs.c:152(vfs_gpfs_get_real_filename)
  smbd_gpfs_get_realfilename_path returned No such file or directory

gpfs 3.4.0-11 not longer working - errno=14
[2012/02/14 15:59:54.772861,  5] smbd/filename.c:257(unix_convert)
  unix_convert called on file "test.txt"
[2012/02/14 15:59:54.772896,  5] smbd/filename.c:416(unix_convert)
  unix_convert begin: name = test.txt, dirpath = , start = test.txt
[2012/02/14 15:59:54.772934,  3] modules/gpfs.c:161(smbd_gpfs_get_realfilename_path)
  calling gpfs_get_realfilename_path_fn() with args pathname=/test.txt filename=BBBBBBBBBB buflen=4096
[2012/02/14 15:59:54.772968,  3] modules/gpfs.c:163(smbd_gpfs_get_realfilename_path)
  called gpfs_get_realfilename_path_fn(), returned -1 errno=14,  args pathname=/test.txt filename=BBBBBBBBBB buflen=4096
[2012/02/14 15:59:54.772994, 10] modules/vfs_gpfs.c:152(vfs_gpfs_get_real_filename)
  smbd_gpfs_get_realfilename_path returned Bad address
Comment 1 Christian Ambach 2012-02-14 15:47:11 UTC
This seems to be a regression in GPFS that should be fixed in GPFS.

You can disable the use of this call with gpfs:getrealfilename = no in smb.conf until GPFS has solved the issue
Comment 2 Heiner Billich 2012-02-14 15:58:03 UTC
Hello,

thank you for the workaround. It did work when I've put the setting


gpfs:getrealfilename = no

into the [global] section, it did not work when I've put it into section for the specific share.
Comment 3 Christian Ambach 2012-02-14 16:02:16 UTC
We just recently made this a share specific option in upstream, this is not available in 3.5.x or 3.6.x yet

So you need to set it as global option.
Comment 4 Heiner Billich 2012-02-14 16:16:23 UTC
(In reply to comment #1)
> This seems to be a regression in GPFS that should be fixed in GPFS.
> 
> You can disable the use of this call with gpfs:getrealfilename = no in smb.conf
> until GPFS has solved the issue

I did send a report to the gpfs mailing list, too.