Skip to content

Commit

Permalink
CA-400743: perform post snapshot rename in ioretry
Browse files Browse the repository at this point in the history
It appears that SMB3 filers or Windows hosts can return EACCES in
response to a rename of a file over one of the links to a file if the
rename is done too soon after the hardlink is made. Allow the rename
to be retried in the event of EIO or ACCES.

Signed-off-by: Mark Syms <[email protected]>
  • Loading branch information
MarkSymsCtx committed Oct 31, 2024
1 parent c54759c commit b55b4c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/FileSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,10 @@ def _snapshot(self, snap_type, cbtlog=None, cbt_consistency=None):
"FileSR_fail_snap1",
self.__fist_enospace)
util.ioretry(lambda: self._snap(tmpsrc, newsrcname))
self._rename(tmpsrc, src)
# SMB3 can return EACCES if we attempt to rename over the
# hardlink leaf too quickly after creating it.
util.ioretry(lambda: self._rename(tmpsrc, src),
errlist=[errno.EIO, errno.EACCES])
if snap_type == VDI.SNAPSHOT_DOUBLE:
# Fault injection site to fail the snapshot with ENOSPACE
util.fistpoint.activate_custom_fn(
Expand Down

0 comments on commit b55b4c4

Please sign in to comment.