]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: disable inode emulation on Windows
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 22 Feb 2021 11:24:56 +0000 (11:24 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 5 Mar 2021 07:59:48 +0000 (07:59 +0000)
cephfs will use fake inodes when sizeof(ino_t) < 8. On Windows,
ino_t is defined as unsigned short (2B), which isn't enough.

On the other hand, most "native" Windows structures, including the
Dokan ones, are using 64b identifiers.

That being considered, we'll disable inode emulation on Windows.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/client/Client.cc

index d614a53a2612ed730f955bab9291f93f70fa63d6..4b5aec4b3efb7545c8789155a0eca2013af422b2 100644 (file)
@@ -209,7 +209,13 @@ void Client::_reset_faked_inos()
   free_faked_inos.insert(start, (uint32_t)-1 - start + 1);
   last_used_faked_ino = 0;
   last_used_faked_root = 0;
+  #ifdef _WIN32
+  // On Windows, sizeof(ino_t) is just 2. Despite that, most "native"
+  // Windows structures, including Dokan ones, are using 64B identifiers.
+  _use_faked_inos = false;
+  #else
   _use_faked_inos = sizeof(ino_t) < 8 || cct->_conf->client_use_faked_inos;
+  #endif
 }
 
 void Client::_assign_faked_ino(Inode *in)