Commit Graph

6 Commits

Author SHA1 Message Date
Chad Austin
05ab2eb53d use the compiler-defined _WIN32 define
Summary:
WIN32 is defined by windows.h. _WIN32 is defined by the compiler. The
latter is more reliable under refactoring.

Reviewed By: xavierd

Differential Revision: D47528663

fbshipit-source-id: 494f18d94968d9c8ea38fe395881e87c0368728e
2023-07-17 15:18:23 -07:00
Chad Austin
6c8c2ed747 clang-tidy advice
Summary:
clang-tidy had some automated suggestions for our code. Apply the ones
that make sense.

Some of them didn't, like removal of all uses of `volatile`. I
manually reverted those changes.

Reviewed By: genevievehelsel

Differential Revision: D41051052

fbshipit-source-id: 3fe22a91e929d3bb8e6346126c2c7bf9f027eb32
2023-07-13 16:30:55 -07:00
Katie Mancini
2a7ecc039c move benchharness
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.

I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.

This diff:

process name cache has some benchmark tests so I am moving benchharness over.

Reviewed By: chadaustin

Differential Revision: D34218024

fbshipit-source-id: 260730adb7e5d4a3131e72fa2f03cc4c5066c075
2022-04-04 11:37:38 -07:00
Xavier Deguillard
a29d465ee8 fs: fix license header
Summary:
With Facebook having been renamed Meta Platforms, we need to change the license
headers.

Reviewed By: fanzeyi

Differential Revision: D33407812

fbshipit-source-id: b11bfbbf13a48873f0cea75f212cc7b07a68fb2e
2022-01-04 15:00:07 -08:00
Xavier Deguillard
b126fc44ce service: allow Thrift queries to synchronize the working copy
Summary:
From the Thrift documentation:

    * Ensure that all inflight working copy modification have completed.
    *
    * On some platforms, EdenFS is processing working copy modifications
    * callbacks from the platform in an asynchronous manner, which means that by
    * the time a write/creat/mkdir/unlink/etc syscall returns from the kernel,
    * EdenFS may not have updated its internal state.
    *
    * Thus, an application making changes to the working copy and quickly
    * requesting EdenFS to perform an operation on it will race with EdenFS
    * updating its internal state and may thus get stale data.
    *
    * To avoid this, EdenFS queries need to internally synchronize the working
    * copy before performing the query itself. This structure defines how EdenFS
    * will do this.
    *
    * Applications that care about synchronizing EdenFS up to a certain point in
    * time are expected to set a non-zero syncTimeout once to synchronize EdenFS
    * and then issue all their thrift requests with a syncTimeout of 0.

Reviewed By: chadaustin

Differential Revision: D32900351

fbshipit-source-id: c242d881b2f2db6cbca544288a0eac5959469fc5
2021-12-09 14:57:01 -08:00
Katie Mancini
e8128fea3b benchmark filesystem based xattr calls
Summary:
EdenFS NFS does not support filesystem getxattr calls. This means for now tools
that rely on sha1 will need to use thrift. To understand how big of a regression
this is I am benchmarking the difference between reading files via thrift and
filesystem.

We already have a benchmark for measuring thrift sha1 accesses, so I am
extending this to support xattrs through the filesystem as well.

Reviewed By: chadaustin

Differential Revision: D31161699

fbshipit-source-id: 9f6b1d98de18c9ca720cfa18c7094d322ae4161a
2021-11-02 17:42:49 -07:00