Bug 762090 (GLUSTER-358) - kernel build fails on samba mount
Summary: kernel build fails on samba mount
Keywords:
Status: CLOSED DUPLICATE of bug 762101
Alias: GLUSTER-358
Product: GlusterFS
Classification: Community
Component: booster
Version: 2.0.7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-04 08:33 UTC by Raghavendra G
Modified: 2009-11-12 17:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
dmesg output of cifs module (2.34 KB, application/octet-stream)
2009-11-04 05:34 UTC, Raghavendra G
no flags Details
smbd log file (555.14 KB, application/octet-stream)
2009-11-04 05:35 UTC, Raghavendra G
no flags Details
gluster logs (50.33 KB, application/octet-stream)
2009-11-04 05:41 UTC, Raghavendra G
no flags Details
patchset providing relative path support (12.40 KB, application/gzip)
2009-11-04 05:42 UTC, Raghavendra G
no flags Details
small program to reproduce the issue (487 bytes, text/plain)
2009-11-04 05:44 UTC, Raghavendra G
no flags Details

Description Raghavendra G 2009-11-04 05:34:24 UTC
Created attachment 89 [details]
A test program to reproduce the bug.

Comment 1 Raghavendra G 2009-11-04 05:35:08 UTC
Created attachment 90 [details]
patch to fix this bug; should be submitted to Expect maintainers

Comment 2 Raghavendra G 2009-11-04 05:41:43 UTC
Created attachment 91 [details]
add --numeric-* options to netstat

Comment 3 Raghavendra G 2009-11-04 05:42:34 UTC
Created attachment 92 [details]
Test file to reproduce bug, with comments

Comment 4 Raghavendra G 2009-11-04 05:44:06 UTC
Created attachment 93 [details]
A replacement for the termcap-fixes.patch in the current srpm

the file being opened should be of non-zero length.

Comment 5 Raghavendra G 2009-11-04 08:33:33 UTC
smbd is running on booster. Booster is compiled from my custom branch and I will be attaching the patches committed only to my custom branch. mount.cifs is the samba client being used

While trying to build kernel on samba mount it fails complaining of open failing on a file with EBADF. And this bug can be reproduced by trying to open any non-zero sized file with flags O_WRONLY | O_TRUNC | O_LARGEFILE | O_CREAT. I've attached a small C program which can reproduce the issue.

The glusterfs logs (smbd is LD_PRELOADed with booster) show a successful completion of open and infact the smbd logs also say the same. As per smbd logs, even operations like fstat etc on opened fd are successful. However, dmesg output of cifs module says about not able to set the file-size of the file (cifs_setattr is failing with EBADF).

With glusterfs running as fuse-mount, kernel build runs fine albeit slow.

Comment 6 Raghavendra G 2009-11-04 16:14:58 UTC
ftruncate64 is not implemented by booster. Hence libc ftruncate64 was being called and resulted in EINVAL/EBADF errors.

Comment 7 Raghavendra G 2009-11-04 16:17:06 UTC
I missed that cifs client module actually breaks open with O_TRUNC into a truncate call followed by open. smbd in turn implements a truncate by opening the file and calling ftruncate on resulting fd. Hence we got EBADF error in open on samba client.

Comment 8 Raghavendra G 2009-11-12 14:20:44 UTC

*** This bug has been marked as a duplicate of bug 369 ***


Note You need to log in before you can comment on or make changes to this bug.