Skip to content

vfs_ceph: Implement SMB_VFS_FSET_DOS_ATTRIBUTES for precise btime

Various tests from smb2.durable-open testsuite failed when run against CephFS backed shares using vfs_ceph module.

test: reopen1a
time: 2024-05-17 07:01:04.154096
time: 2024-05-17 07:02:05.026275
failure: reopen1a [
../../source4/torture/smb2/durable_open.c:500: Incorrect status NT_STATUS_OBJECT_NAME_NOT_FOUND - should be NT_STATUS_OK
]
test: reopen1a-lease
time: 2024-05-17 07:02:05.026388
time: 2024-05-17 07:03:06.070333
failure: reopen1a-lease [
../../source4/torture/smb2/durable_open.c:702: Incorrect status NT_STATUS_OBJECT_NAME_NOT_FOUND - should be NT_STATUS_OK
]
test: reopen2
time: 2024-05-17 07:03:06.070517
time: 2024-05-17 07:04:06.789858
failure: reopen2 [
../../source4/torture/smb2/durable_open.c:790: Incorrect status NT_STATUS_OBJECT_NAME_NOT_FOUND - should be NT_STATUS_OK
]

Debug logs had the following entries:

vfs_default_durable_reconnect (durable_open_reopen1a_cBCmhs2+.dat): stat_ex.st_ex_btime differs: cookie:'2024/05/17 07:12:16.913181' != stat:'2024/05/17 07:12:16.913181', denying durable reconnect

vfs_default_durable_reconnect (durable_v2_open_reopen1a_lease_f5kL_CxO.dat): stat_ex.st_ex_btime differs: cookie:'2024/05/17 07:13:18.012166' != stat:'2024/05/17 07:13:18.012166', denying durable reconnect

vfs_default_durable_reconnect (durable_open_reopen2_.7M-S+Bx.dat): stat_ex.st_ex_btime differs: cookie:'2024/05/17 07:14:19.352903' != stat:'2024/05/17 07:14:19.352903', denying durable reconnect

It looks confusing but the devil is in the details. Lack of precise matching in st_ex_btime.tv_nsec caused durable handle reconnect to fail. An implementation similar to SMB_VFS_FGET_DOS_ATTRIBUTES was missing in vfs_ceph for SMB_VFS_FSET_DOS_ATTRIBUTES.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Anoop C S

Merge request reports