mirror of https://github.com/trapexit/mergerfs.git
Browse Source
Merge pull request #349 from trapexit/inode
Merge pull request #349 from trapexit/inode
support setting of inodes (using use_ino option)pull/350/head
Antonio SJ Musumeci
8 years ago
committed by
GitHub
6 changed files with 101 additions and 25 deletions
-
9README.md
-
17man/mergerfs.1
-
10src/fgetattr.cpp
-
42src/fs_inode.hpp
-
39src/getattr.cpp
-
3src/readdir.cpp
@ -0,0 +1,42 @@ |
|||
/*
|
|||
ISC License |
|||
|
|||
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link> |
|||
|
|||
Permission to use, copy, modify, and/or distribute this software for any |
|||
purpose with or without fee is hereby granted, provided that the above |
|||
copyright notice and this permission notice appear in all copies. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|||
*/ |
|||
|
|||
#ifndef __FS_INODE_HPP__
|
|||
#define __FS_INODE_HPP__
|
|||
|
|||
#include <sys/stat.h>
|
|||
|
|||
namespace fs |
|||
{ |
|||
namespace inode |
|||
{ |
|||
enum |
|||
{ |
|||
MAGIC = 0x7472617065786974 |
|||
}; |
|||
|
|||
inline |
|||
void |
|||
recompute(struct stat &st) |
|||
{ |
|||
st.st_ino |= (st.st_dev << 32); |
|||
} |
|||
} |
|||
} |
|||
|
|||
#endif
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue