Summary: SMB mounts do not support hard links. The ENOTSUP error code is returned, which should be interpreted by PosixFileSystem as IOStatus::NotSupported(). Pull Request resolved: https://github.com/facebook/rocksdb/pull/9657 Reviewed By: mrambacher Differential Revision: D34634783 Pulled By: anand1976 fbshipit-source-id: 0d57f5b2e6118e4c20e9ed1a293327428c3aecac
This commit is contained in:
parent
94a71b686e
commit
9f0a64c4f1
6
env/fs_posix.cc
vendored
6
env/fs_posix.cc
vendored
@ -753,8 +753,10 @@ class PosixFileSystem : public FileSystem {
|
||||
const IOOptions& /*opts*/,
|
||||
IODebugContext* /*dbg*/) override {
|
||||
if (link(src.c_str(), target.c_str()) != 0) {
|
||||
if (errno == EXDEV) {
|
||||
return IOStatus::NotSupported("No cross FS links allowed");
|
||||
if (errno == EXDEV || errno == ENOTSUP) {
|
||||
return IOStatus::NotSupported(errno == EXDEV
|
||||
? "No cross FS links allowed"
|
||||
: "Links not supported by FS");
|
||||
}
|
||||
return IOError("while link file to " + target, src, errno);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user