forked from ceph/ceph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: Port CephFS client to Windows
This patch provides a few changes required in order to use the CephFS client on Windows. A subsequent patch will make use of it along with Dokan, an interface similar to Fuse. Signed-off-by: Lucian Petrut <[email protected]>
- Loading branch information
1 parent
ae8d603
commit 073b81c
Showing
9 changed files
with
150 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Ceph - scalable distributed file system | ||
* | ||
* Copyright (C) 2021 SUSE LINUX GmbH | ||
* | ||
* This is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License version 2.1, as published by the Free Software | ||
* Foundation. See file COPYING. | ||
* | ||
*/ | ||
|
||
// Those definitions allow handling information coming from Ceph and should | ||
// not be passed to Windows functions. | ||
|
||
#define S_IFLNK 0120000 | ||
|
||
#define S_ISTYPE(m, TYPE) ((m & S_IFMT) == TYPE) | ||
#define S_ISLNK(m) S_ISTYPE(m, S_IFLNK) | ||
#define S_ISUID 04000 | ||
#define S_ISGID 02000 | ||
#define S_ISVTX 01000 | ||
|
||
#define LOCK_SH 1 | ||
#define LOCK_EX 2 | ||
#define LOCK_NB 4 | ||
#define LOCK_UN 8 | ||
#define LOCK_MAND 32 | ||
#define LOCK_READ 64 | ||
#define LOCK_WRITE 128 | ||
#define LOCK_RW 192 | ||
|
||
#define AT_SYMLINK_NOFOLLOW 0x100 | ||
|
||
#define MAXSYMLINKS 65000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef _SYS_STATVFS_H | ||
#define _SYS_STATVFS_H 1 | ||
|
||
typedef unsigned __int64 fsfilcnt64_t; | ||
typedef unsigned __int64 fsblkcnt64_t; | ||
typedef unsigned __int64 fsblkcnt_t; | ||
|
||
struct statvfs | ||
{ | ||
unsigned long int f_bsize; | ||
unsigned long int f_frsize; | ||
fsblkcnt64_t f_blocks; | ||
fsblkcnt64_t f_bfree; | ||
fsblkcnt64_t f_bavail; | ||
fsfilcnt64_t f_files; | ||
fsfilcnt64_t f_ffree; | ||
fsfilcnt64_t f_favail; | ||
unsigned long int f_fsid; | ||
unsigned long int f_flag; | ||
unsigned long int f_namemax; | ||
int __f_spare[6]; | ||
}; | ||
struct flock { | ||
short l_type; | ||
short l_whence; | ||
off_t l_start; | ||
off_t l_len; | ||
pid_t l_pid; | ||
}; | ||
|
||
#define F_RDLCK 0 | ||
#define F_WRLCK 1 | ||
#define F_UNLCK 2 | ||
#define F_SETLK 6 | ||
|
||
#endif /* _SYS_STATVFS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters