unix: treat futimens() as best-effort in copyfile#5053
Conversation
2f65b5f to
498579e
Compare
498579e to
2681bf0
Compare
santigimeno
left a comment
There was a problem hiding this comment.
Not blocking this but I was wondering if preserving timestamps is best effort, why don't just simply ignore whether futimens() fails or not.
|
Santi has a good point. |
|
I did think about ignoring Other options I can think of (other than the current approach) are:
I'm happy to go with any of these but as I'm a new contributor I'd appreciate your guidance. Thank you! :) |
It that's the case, next syscalls on the same fd will fail, won't they?
Yes, I would go this route. |
futimens() may fail with EPERM on CIFS/SMB shares that do not support setting timestamps. Since preserving timestamps during copyfile is best-effort, ignore the return value unconditionally. Fixes: nodejs/node#56248 Refs: libuv#4396
2681bf0 to
94c5b04
Compare
|
@santigimeno I've updated this to reflect your recommended route, I appreciate the assistance. |
|
@saghul @santigimeno Let me know if there's anything I can do to assist in getting this merged. I'm keen on getting started on back-porting this fix to the affected Node versions for nodejs/node#56248 |
|
If perchance anyone here is also a Node maintainer and would like to review the cherry-pick, that would be much appreciated: nodejs/node#62881 |
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: nodejs#56248
PR-URL: nodejs#62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: nodejs#56248
PR-URL: nodejs#62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: nodejs#56248
PR-URL: nodejs#62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: nodejs#56248
PR-URL: nodejs#62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
futimens()inuv__fs_copyfile()fails withEPERMon CIFS/SMBmounts as these filesystems don't support setting timestamps. This
causes
uv_fs_copyfile()to fail when copying files to CIFS shares.Since timestamp preservation during copy is best-effort (same as
fchown()in the same function), ignore the return valueunconditionally rather than failing the entire copy.
Reproducer: mount a CIFS share in a Linux container and call
uv_fs_copyfile()to copy a file from local disk to the share.Fixes: nodejs/node#56248
Refs: #4396