summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-11-18 17:22:31 +0100
committerJeremy Allison <jra@samba.org>2010-12-17 21:11:04 +0100
commit9634d03339073a094ad5d4a7c33b0c63a131c442 (patch)
treeac095354a804cc5e13c11f489497be1186575f44 /source3
parent480042ddf9f68bd89368c7373f71044b64b0f494 (diff)
downloadsamba-9634d03339073a094ad5d4a7c33b0c63a131c442.tar.gz
samba-9634d03339073a094ad5d4a7c33b0c63a131c442.tar.bz2
samba-9634d03339073a094ad5d4a7c33b0c63a131c442.zip
s3/vfs_gpfs: map SPARSE attribute to/from WINATTRs, too
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 694bde7da0..ffe51c305e 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -970,7 +970,7 @@ static int gpfs_set_xattr(struct vfs_handle_struct *handle, const char *path,
dosmode = dosattrib.info.info3.attrib;
attrs.winAttrs = 0;
- /*Just map RD_ONLY, ARCHIVE, SYSTEM and HIDDEN. Ignore the others*/
+ /*Just map RD_ONLY, ARCHIVE, SYSTEM HIDDEN and SPARSE. Ignore the others*/
if (dosmode & FILE_ATTRIBUTE_ARCHIVE){
attrs.winAttrs |= GPFS_WINATTR_ARCHIVE;
}
@@ -983,6 +983,9 @@ static int gpfs_set_xattr(struct vfs_handle_struct *handle, const char *path,
if (dosmode & FILE_ATTRIBUTE_READONLY){
attrs.winAttrs |= GPFS_WINATTR_READONLY;
}
+ if (dosmode & FILE_ATTRIBUTE_SPARSE) {
+ attrs.winAttrs |= GPFS_WINATTR_SPARSE_FILE;
+ }
ret = set_gpfs_winattrs(CONST_DISCARD(char *, path),
@@ -1019,7 +1022,7 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat
DEBUG(10, ("gpfs_get_xattr:Got attributes: 0x%x\n",attrs.winAttrs));
- /*Just map RD_ONLY, ARCHIVE, SYSTEM and HIDDEN. Ignore the others*/
+ /*Just map RD_ONLY, ARCHIVE, SYSTEM, HIDDEN and SPARSE. Ignore the others*/
if (attrs.winAttrs & GPFS_WINATTR_ARCHIVE){
dosmode |= FILE_ATTRIBUTE_ARCHIVE;
}
@@ -1032,6 +1035,9 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat
if (attrs.winAttrs & GPFS_WINATTR_READONLY){
dosmode |= FILE_ATTRIBUTE_READONLY;
}
+ if (attrs.winAttrs & GPFS_WINATTR_SPARSE_FILE) {
+ dosmode |= FILE_ATTRIBUTE_SPARSE;
+ }
snprintf(attrstr, size, "0x%2.2x", dosmode & SAMBA_ATTRIBUTES_MASK);
DEBUG(10, ("gpfs_get_xattr: returning %s\n",attrstr));