1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-09 20:23:51 +03:00
Commit Graph

61 Commits

Author SHA1 Message Date
Alexander Bokovoy
e342ca0d93 Remove is_remotestorage() call from VFS. We already have statvfs() there to handle FS capabilities.
As discussed with Volker, it is better to calculate FS capabilities at
connection time. We already do this with help of VFS statvfs() call
which allows to fill-in system-specific attributes including FS
capabilities. So just re-use it if you want to represent additional
capabilities in your modules. The only caution is that you need to
call underlying statvfs() call to actually get system-specific
capabilities (and other fields) added. Then add module-specific ones.
2008-01-17 16:59:29 +03:00
Alexander Bokovoy
75cc086614 Rework of VFS is_offline() function to only return boolean offline/online result for a file.
This makes sense as upper levels are only taking returned result of 0
(no error) into consideration when deciding whether to mark file
offline/online as returned from is_offline.

That means that we simply can move the decision down to VFS module and
clean up upper levels so that they always see only file status. If there
is an error when trying to identify file status, then VFS module could
decide what to return (offline or online) by itself -- after all, it
ought to have system-specific knowledge anyway.
2008-01-17 14:57:35 +03:00
Jeremy Allison
bcc94aed6f Fix the mess that ab just made of the new VFS code.
NEEDS MORE TESTING !
Jeremy.
2008-01-16 17:22:31 -08:00
Alexander Bokovoy
875208724e Add support for offline files support, remote storage, and Async I/O force operations to VFS
Offline files support and remote storage are for allowing communication with
backup and archiving tools that mark files moved to a tape library as offline.
We translate this info into corresponding CIFS offline file attribute and
mark an exported volume as remote storage.

Async I/O force is to allow selective redirection of I/O operations to asynchronous
processing in case it is viable at VFS module discretion. It is needed for
proper handling of offline files as performing regular I/O on offline file will
block smbd.


Signed-off-by: Alexander Bokovoy <ab@samba.org>
2008-01-16 12:17:03 +03:00
Michael Adam
3958abffaf Combine fsp and tofd to tofsp in SMB_VFS_RECVFILE().
Michael
2008-01-11 01:27:05 +01:00
Michael Adam
a52cfb7d77 Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().
Michael
2008-01-11 01:27:05 +01:00
Michael Adam
c8ae7d095a Remove redundant parameter fd from SMB_VFS_WRITE().
Michael
2008-01-10 15:49:35 +01:00
Michael Adam
a8fc2ddad8 Remove redundant parameter fd from SMB_VFS_READ().
Michael
2008-01-10 15:33:51 +01:00
Michael Adam
3c997ae000 Remove redundant parameter fd from SMB_VFS_AIO_CANCEL().
Michael
2008-01-08 12:20:55 +01:00
Michael Adam
0bd2643463 Remove redundant parameter fd from SMB_VFS_FSETXATTR().
Michael
2008-01-08 11:47:33 +01:00
Michael Adam
bfc3b5a27f Remove redundant parameter fd from SMB_VFS_FREMOVEXATTR().
Michael
2008-01-08 11:29:09 +01:00
Michael Adam
167649b3b8 Remove redundant parameter fd from SMB_VFS_FLISTXATTR().
Michael
2008-01-08 10:51:40 +01:00
Michael Adam
2cb739a82d Remove redundant parameter fd from SMB_VFS_FGETXATTR().
Michael
2008-01-08 10:00:47 +01:00
Michael Adam
9296e93588 Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
2008-01-08 01:54:19 +01:00
Michael Adam
7b201c177b Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().
Michael
2008-01-08 01:14:24 +01:00
Michael Adam
42663e8736 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
2008-01-07 23:54:07 +01:00
Michael Adam
ee5a20becd Remove redundant parameter fd from SMB_VFS_GETLOCK().
Michael
2008-01-07 22:18:50 +01:00
Michael Adam
8880eb82f1 Remove redundant parameter fd from SMB_VFS_LINUX_SETLEASE().
Michael
2008-01-07 21:47:56 +01:00
Michael Adam
195c519377 Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().
Michael
2008-01-07 17:14:20 +01:00
Michael Adam
4f3ab2c406 Remove redundant parameter fd from SMB_VFS_LOCK().
Michael
2008-01-07 16:38:23 +01:00
Michael Adam
20691272a1 Fix the build: Fix caller of strict_allocate_ftruncate().
Michael
2008-01-07 16:12:03 +01:00
Michael Adam
2ad66050a0 Remove redundant parameter fd from SMB_VFS_FTRUNCATE().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
fbb193db3e Remove redundant parameter fd from SMB_VFS_FCHOWN().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
a54d5604da Remove redundant parameter fd from SMB_VFS_FCHMOD().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
0b86c420be Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
8f83c9a7b2 Remove redundant parameter fd from SMB_VFS_FSYNC().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
df929796f2 Remove redundant parameter fd from SMB_VFS_LSEEK().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
8c4901a19a Remove redundant parameter fd from SMB_VFS_PWRITE().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
73e28806ce Remove unneeded parameter fd from SMB_VFS_PREAD().
Michael
2008-01-07 00:14:19 +01:00
Michael Adam
4f2d139a18 Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().
Michael
2008-01-06 23:08:00 +01:00
Michael Adam
c0c7c1223d Remove superfluous fd parameter from SMB_VFS_FGET_NT_ACL().
Michael
2008-01-06 23:07:59 +01:00
Michael Adam
b5f600fab5 Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and
a file name. All the underlying functions should need and now
do need (after the previous preparatory work), is a connection_struct
and a file name. The connection_struct is already there in the
vfs_handle passed to the vfs functions. So the files_struct
argument can be eliminated.

This eliminates the need of calling open_file_stat in a couple
of places to produce the fsp needed.

Michael
2007-12-19 23:08:01 +01:00
Michael Adam
50c82cc145 Split get_nt_acl() into two functions: fsp- and non-fsp variant.
Replace smbd/posix_acls.c:get_nt_acl() by two funcions:
posix_get_nt_acl() and posix_fget_nt_acl(). The first
takes a connection struct and a file name instead of a
files_struct pointer. This is in preparation of changing
the vfs api for SMB_VFS_GET_NT_ACL.

Michael
2007-12-19 23:07:56 +01:00
Volker Lendecke
dcbe1bf942 Make [f]get_nt_acl return NTSTATUS 2007-11-13 15:47:01 +01:00
Jeremy Allison
bfbdb6324c Add in the recvfile entry to the VFS layer with a default
implementation. Needed for the zero-copy write code.
Jeremy.
2007-10-29 17:16:13 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Stefan Metzmacher
cdaa24e804 r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.

metze
2007-10-10 12:29:08 -05:00
James Peach
234cb7c893 r23962: Linux oplock support is conditional on HAVE_KERNEL_OPLOCKS_LINUX,
not plain old LINUX.
2007-10-10 12:28:49 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jeremy Allison
fc6899a550 r23620: Convert set_nt_acl to return NTSTATUS. Also fix the chown
return to correctly return NT_STATUS_INVALID_OWNER if it
should be disallowed. Matches better what W2K3R3 does.

NFSv4 ACL module owners, please examine these changes.

Jeremy.
2007-10-10 12:23:37 -05:00
Jeremy Allison
932523cbb5 r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.
2007-10-10 12:22:46 -05:00
Volker Lendecke
fd45e0ff73 r22907: Fix the build with --enable-profiling-data 2007-10-10 12:22:06 -05:00
James Peach
395fd99edb r22094: Clarify that SMB_VFS_LOCK should not be used to get lock status. 2007-10-10 12:19:10 -05:00
Jeremy Allison
63b061a2ea r21956: Fix bug reported by don.mccall@hp.com for platforms
without utimes() call (only utime()).
Jeremy.
2007-10-10 12:18:52 -05:00
James Peach
e7b21b1ef3 r21950: After discussion with the Apple and Linux client maintainers,
changing the FindFirst response for the UNIX_INFO2 level to include
a length field before the name. The name is not required to be null
terminated. The length field does not count any null.

Also add call to chflags(2) in the default VFS module so that this
will work be default on BSD-derived platform. Add UNIX-INFO2 test
to the build farm to get some non-BSD coverage.

Jeremy and Jerry, please review for inclusion in 3.0.25.
2007-10-10 12:18:51 -05:00
James Peach
7e862b9080 r21767: Revert all the bits I accidentally committed in r21766. 2007-10-10 12:18:30 -05:00
James Peach
f82ac78b2f r21766: Fix compiler warning. 2007-10-10 12:18:29 -05:00
James Peach
16cb22d6b8 r21757: Add SMB_VFS_CHFLAGS operation. 2007-10-10 12:18:28 -05:00