Project

General

Profile

Bug #55510

Cannot seek to offset "0xfffffff0000 - 1" within file

Added by Sachin Prabhu almost 2 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

I am testing a Samba Server running within a container which exports a rook provided cephfs share using the smbtorture suite.
I hit a failure with the test smb2.rw.invalid which isn't seen when the underlying filesystem is not cephfs.

[root@smbclient samba-integration]# /bin/smbtorture --fullname --target=samba3 --user=sambauser%samba //10.244.2.14/smbshare3 smb2.rw.invalid
smbtorture 4.15.5
Using seed 1651410917
time: 2022-05-01 13:15:17.325545
test: smb2.rw.invalid
time: 2022-05-01 13:15:17.327756
dos charset 'CP850' unavailable - using ASCII
time: 2022-05-01 13:15:17.444662
failure: smb2.rw.invalid [
../../source4/torture/smb2/read_write.c:331: status was NT_STATUS_DISK_FULL, expected NT_STATUS_OK: Incorrect status
]

This is caused by the following bit of code within the smbtorture test.

w.in.file.handle = h;    
w.in.offset = 0xfffffff0000 - 1; /* MAXFILESIZE - 1 */
w.in.data.data = buf;
w.in.data.length = 1;
status = smb2_write(tree, &w);
if (TARGET_IS_SAMBA3(torture) || TARGET_IS_SAMBA4(torture)) {
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(w.out.nwritten, 1);

The failure is caused when you seek FILEMAX-1. I have attached a simple reproducer which can be run directly on the filesystem to demonstrate the problem.
When running this against a cephfs filesystem.

[root@smbshare3-0 /]# grep /mnt /proc/mounts
10.111.173.90:6789,10.110.224.62:6789,10.101.104.103:6789:/volumes/csi/csi-vol-0cb59f87-c54e-11ec-ad3d-1e1dd7acb57d/ae264282-34b6-4255-a25c-6d8f60d9fc5e /mnt/dc189f61-d413-4b76-bb99-4b86beb30c0a ceph rw,relatime,name=csi-cephfs-node,secret=<hidden>,acl,mds_namespace=myfs 0 0
[root@smbshare3-0 /]# /tmp/write_test /mnt/dc189f61-d413-4b76-bb99-4b86beb30c0a/test
Error seeking offset:22: Invalid argument

and when against a standard file within /tmp

[root@smbshare3-0 /]# /tmp/write_test /tmp/test
-- Done
[root@smbshare3-0 /]# ls -lh /tmp/test
-rwxr-xr-x 1 root root 16T May 1 13:39 /tmp/test

This is very low priority for us and has been reported just to point out the difference when running Samba on cephfs vs other filesystems. Please close if you don't think that this is an issue.

write_test.c View - Reproducer (907 Bytes) Sachin Prabhu, 05/01/2022 02:02 PM

History

#1 Updated by Jeff Layton almost 2 years ago

I think this is a limitation imposed by the ceph MDS. Sachin, can you try setting this on your test setup and see if it works around the problem?

https://docs.ceph.com/en/latest/cephfs/administration/?#settings

#2 Updated by Jeff Layton almost 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Jeff Layton

#3 Updated by Jeff Layton over 1 year ago

Closing this out as I'm cleaning out old ceph bugs. Sachin, please reopen if raising the MDS limit doesn't fix it.

#4 Updated by Jeff Layton over 1 year ago

  • Status changed from In Progress to Rejected

Also available in: Atom PDF