Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
through the vfs
|
|
|
|
|
|
This patch introduces two new temporary helper functions
vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me
to call the new smb_filename version of stat, while avoiding plumbing
it through callers that are still too inconvenient. As the conversion
moves along, I will be able to remove callers of this, with the goal
being to remove all callers.
There was also a bug in create_synthetic_smb_fname_split (also a
temporary utility function) that caused it to incorrectly handle
filenames with ':'s in them when in posix mode. This is now fixed.
|
|
This was a little messy because of all of the vfs modules I had to
touch. Most of them were pretty straight forward, but the streams
modules required a little attention to handle smb_filename. Since the
use of smb_filename enables the vfs modules to access the raw,
over-the-wire stream, a little bit of the handling that was being done
by split_ntfs_stream_name has now been shifted into the individual
stream modules. It may be a little more code, but overall it gives
more flexibility to the streams modules, while also allowing correct
stream handling.
|
|
This patch introduces
struct stat_ex {
dev_t st_ex_dev;
ino_t st_ex_ino;
mode_t st_ex_mode;
nlink_t st_ex_nlink;
uid_t st_ex_uid;
gid_t st_ex_gid;
dev_t st_ex_rdev;
off_t st_ex_size;
struct timespec st_ex_atime;
struct timespec st_ex_mtime;
struct timespec st_ex_ctime;
struct timespec st_ex_btime; /* birthtime */
blksize_t st_ex_blksize;
blkcnt_t st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;
It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.
Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.
At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.
It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
|
|
modules shouldn't matter, so as vfs_streams_depot doesn't
implement get/setxattrs then call into the full VFS stack
at the top.
Jeremy
|
|
Jeremy.
|
|
Since file_id_create_dev is incompatible with the concept of file_ids,
it is now static and in the one file that needs it.
|
|
* this allows VFS implementations that prefetch stat information on
readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
set to invalid
|
|
This allows module implementors to customize what allocation size is
returned to the client.
|
|
work with NTRENAME
Handling of error codes when renaming a file to a stream and a stream
to a file is now done in rename_internals_fsp.
The NTRENAME stream path only passes in the stream name, so the new
base can now be different from the old base.
|
|
streams_depot:check_valid=no is useful when the filesystem
has no xattr support and files are only published via samba.
metze
|
|
default value
metze
|
|
metze
|
|
metze
|
|
Jeremy.
|
|
|
|
This is not built by default and not documented in 3.2.0, so I doubt this will
break any setups :-)
(cherry picked from commit ca2dfb372cfd9096407fca67a6b65bceda6f72b6)
(This used to be commit 9393cdda97a886f4bdd187d76461724edeec9ed3)
|
|
It turns out that this is a necessary operation, separate from statvfs. statvfs
can fail during tcon, so conn->fs_capabilities would never see that we support
streams on a particular share.
James, can you check that I got the darwin variant right? Thanks!
(This used to be commit 3ad798d803b3b023533bb48e6993885f22b96095)
|
|
Store streams in a file each. Not 100% finished, and not built by default.
(This used to be commit 5f5fc72b01c8e8fc096375c7cb4a97186c387259)
|