summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-16 12:17:03 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-16 12:17:03 +0300
commitd86fc3ec8c99aaa5ffaa14a97525154507c39df7 (patch)
tree7fb95cd9a112e345fc00a1f156ba01641863ce78 /source3/smbd/trans2.c
parent68694369fc96354452979b07425f3f48c4f73bbe (diff)
downloadsamba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.tar.gz
samba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.tar.bz2
samba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.zip
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>(This used to be commit 875208724e39564fe81385dfe36e6c963e79e101)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index bf6802f2a6..5729ab5349 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2373,8 +2373,8 @@ static void call_trans2qfsinfo(connection_struct *conn,
const char *vname = volume_label(SNUM(conn));
int snum = SNUM(conn);
char *fstype = lp_fstype(SNUM(conn));
- int quota_flag = 0;
-
+ uint32 additional_flags = 0;
+
if (total_params < 2) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
@@ -2487,16 +2487,23 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_dev, (unsi
case SMB_QUERY_FS_ATTRIBUTE_INFO:
case SMB_FS_ATTRIBUTE_INFORMATION:
-
+ additional_flags = 0;
#if defined(HAVE_SYS_QUOTAS)
- quota_flag = FILE_VOLUME_QUOTAS;
+ additional_flags |= FILE_VOLUME_QUOTAS;
#endif
+ if(lp_nt_acl_support(SNUM(conn))) {
+ additional_flags |= FILE_PERSISTENT_ACLS;
+ }
+
+ if(SMB_VFS_IS_REMOTESTORAGE(conn, lp_pathname(SNUM(conn)))) {
+ additional_flags |= FILE_SUPPORTS_REMOTE_STORAGE;
+ additional_flags |= FILE_SUPPORTS_REPARSE_POINTS;
+ }
+
SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH|
- (lp_nt_acl_support(SNUM(conn)) ? FILE_PERSISTENT_ACLS : 0)|
- FILE_SUPPORTS_OBJECT_IDS|
- FILE_UNICODE_ON_DISK|
- quota_flag); /* FS ATTRIBUTES */
+ FILE_SUPPORTS_OBJECT_IDS|FILE_UNICODE_ON_DISK|
+ additional_flags); /* FS ATTRIBUTES */
SIVAL(pdata,4,255); /* Max filename component length */
/* NOTE! the fstype must *not* be null terminated or win98 won't recognise it