Skip to content

Commit

Permalink
feat(mount): Add ignore utimes data for Windows
Browse files Browse the repository at this point in the history
This change adds the needed changes for implementing an option for
ignoring the execution of metadata timestamps update syscalls on the
Windows client.
  • Loading branch information
rolysr committed Jan 16, 2025
1 parent c1f6c26 commit cc4490a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mount/sauna_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ namespace SaunaClient {
typedef uint32_t Inode;
typedef uint32_t JobId;
typedef uint32_t NamedInodeOffset;
#ifdef _WIN32
inline std::atomic<bool> gIgnoreUtimensUpdate = false;
#endif

void update_readdir_session(uint64_t sessId, uint64_t entryIno);
void drop_readdir_session(uint64_t opendirSessionID);
Expand Down Expand Up @@ -88,6 +91,7 @@ struct FsInitParams {
static constexpr unsigned kDefaultCleanAcquiredFilesPeriod = 0;
static constexpr unsigned kDefaultCleanAcquiredFilesTimeout = 0;
static constexpr int kDefaultEnableStatusUpdaterThread = 0;
static constexpr bool kDefaultIgnoreUtimensUpdate = false;
#else
static constexpr unsigned kDefaultWriteCacheSize = 0;
#endif
Expand Down Expand Up @@ -156,6 +160,7 @@ struct FsInitParams {
clean_acquired_files_period(kDefaultCleanAcquiredFilesPeriod),
clean_acquired_files_timeout(kDefaultCleanAcquiredFilesTimeout),
enable_status_updater_thread(kDefaultEnableStatusUpdaterThread),
ignore_utimens_update(kDefaultIgnoreUtimensUpdate),
#endif
ignore_flush(kDefaultIgnoreFlush), verbose(kDefaultVerbose), direct_io(kDirectIO) {
}
Expand Down Expand Up @@ -192,6 +197,7 @@ struct FsInitParams {
clean_acquired_files_period(kDefaultCleanAcquiredFilesPeriod),
clean_acquired_files_timeout(kDefaultCleanAcquiredFilesTimeout),
enable_status_updater_thread(kDefaultEnableStatusUpdaterThread),
ignore_utimens_update(kDefaultIgnoreUtimensUpdate),
#endif
ignore_flush(kDefaultIgnoreFlush), verbose(kDefaultVerbose), direct_io(kDirectIO) {
}
Expand Down Expand Up @@ -246,6 +252,7 @@ struct FsInitParams {
unsigned clean_acquired_files_period;
unsigned clean_acquired_files_timeout;
unsigned enable_status_updater_thread;
unsigned ignore_utimens_update;
#endif

bool ignore_flush;
Expand Down

0 comments on commit cc4490a

Please sign in to comment.