aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h69
1 files changed, 63 insertions, 6 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index bcd4a6136f08..085109d2b55e 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -762,6 +762,16 @@ typedef struct smb_com_lock_req {
762 LOCKING_ANDX_RANGE Locks[1]; 762 LOCKING_ANDX_RANGE Locks[1];
763} LOCK_REQ; 763} LOCK_REQ;
764 764
765
766typedef struct cifs_posix_lock {
767 __le16 lock_type; /* 0 = Read, 1 = Write, 2 = Unlock */
768 __le16 lock_flags; /* 1 = Wait (only valid for setlock) */
769 __le32 pid;
770 __le64 start;
771 __le64 length;
772 /* BB what about additional owner info to identify network client */
773} CIFS_POSIX_LOCK;
774
765typedef struct smb_com_lock_rsp { 775typedef struct smb_com_lock_rsp {
766 struct smb_hdr hdr; /* wct = 2 */ 776 struct smb_hdr hdr; /* wct = 2 */
767 __u8 AndXCommand; 777 __u8 AndXCommand;
@@ -1098,6 +1108,8 @@ struct smb_t2_rsp {
1098#define SMB_QUERY_POSIX_ACL 0x204 1108#define SMB_QUERY_POSIX_ACL 0x204
1099#define SMB_QUERY_XATTR 0x205 1109#define SMB_QUERY_XATTR 0x205
1100#define SMB_QUERY_ATTR_FLAGS 0x206 /* append,immutable etc. */ 1110#define SMB_QUERY_ATTR_FLAGS 0x206 /* append,immutable etc. */
1111#define SMB_QUERY_POSIX_PERMISSION 0x207
1112#define SMB_QUERY_POSIX_LOCK 0x208
1101#define SMB_QUERY_FILE_INTERNAL_INFO 0x3ee 1113#define SMB_QUERY_FILE_INTERNAL_INFO 0x3ee
1102#define SMB_QUERY_FILE_ACCESS_INFO 0x3f0 1114#define SMB_QUERY_FILE_ACCESS_INFO 0x3f0
1103#define SMB_QUERY_FILE_NAME_INFO2 0x3f1 /* 0x30 bytes */ 1115#define SMB_QUERY_FILE_NAME_INFO2 0x3f1 /* 0x30 bytes */
@@ -1116,6 +1128,7 @@ struct smb_t2_rsp {
1116#define SMB_SET_POSIX_ACL 0x204 1128#define SMB_SET_POSIX_ACL 0x204
1117#define SMB_SET_XATTR 0x205 1129#define SMB_SET_XATTR 0x205
1118#define SMB_SET_ATTR_FLAGS 0x206 /* append, immutable etc. */ 1130#define SMB_SET_ATTR_FLAGS 0x206 /* append, immutable etc. */
1131#define SMB_SET_POSIX_LOCK 0x208
1119#define SMB_SET_FILE_BASIC_INFO2 0x3ec 1132#define SMB_SET_FILE_BASIC_INFO2 0x3ec
1120#define SMB_SET_FILE_RENAME_INFORMATION 0x3f2 /* BB check if qpathinfo level too */ 1133#define SMB_SET_FILE_RENAME_INFORMATION 0x3f2 /* BB check if qpathinfo level too */
1121#define SMB_FILE_ALL_INFO2 0x3fa 1134#define SMB_FILE_ALL_INFO2 0x3fa
@@ -1237,9 +1250,27 @@ struct smb_com_transaction2_sfi_rsp {
1237 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1250 struct smb_hdr hdr; /* wct = 10 + SetupCount */
1238 struct trans2_resp t2; 1251 struct trans2_resp t2;
1239 __u16 ByteCount; 1252 __u16 ByteCount;
1240 __u16 Reserved2; /* parameter word reserved - present for infolevels > 100 */ 1253 __u16 Reserved2; /* parameter word reserved -
1254 present for infolevels > 100 */
1255};
1256
1257struct smb_t2_qfi_req {
1258 struct smb_hdr hdr;
1259 struct trans2_req t2;
1260 __u8 Pad;
1261 __u16 Pad1;
1262 __u16 Fid;
1263 __le16 InformationLevel;
1264 __u16 Pad2;
1241}; 1265};
1242 1266
1267struct smb_t2_qfi_rsp {
1268 struct smb_hdr hdr; /* wct = 10 + SetupCount */
1269 struct trans2_resp t2;
1270 __u16 ByteCount;
1271 __u16 Reserved2; /* parameter word reserved -
1272 present for infolevels > 100 */
1273};
1243 1274
1244/* 1275/*
1245 * Flags on T2 FINDFIRST and FINDNEXT 1276 * Flags on T2 FINDFIRST and FINDNEXT
@@ -1524,8 +1555,9 @@ typedef struct {
1524} FILE_SYSTEM_UNIX_INFO; /* Unix extensions info, level 0x200 */ 1555} FILE_SYSTEM_UNIX_INFO; /* Unix extensions info, level 0x200 */
1525/* Linux/Unix extensions capability flags */ 1556/* Linux/Unix extensions capability flags */
1526#define CIFS_UNIX_FCNTL_CAP 0x00000001 /* support for fcntl locks */ 1557#define CIFS_UNIX_FCNTL_CAP 0x00000001 /* support for fcntl locks */
1527#define CIFS_UNIX_POSIX_ACL_CAP 0x00000002 1558#define CIFS_UNIX_POSIX_ACL_CAP 0x00000002 /* support getfacl/setfacl */
1528#define CIFS_UNIX_XATTR_CAP 0x00000004 /*support for new namespace*/ 1559#define CIFS_UNIX_XATTR_CAP 0x00000004 /* support new namespace */
1560#define CIFS_UNIX_EXTATTR_CAP 0x00000008 /* support chattr/chflag */
1529 1561
1530typedef struct { 1562typedef struct {
1531 /* For undefined recommended transfer size return -1 in that field */ 1563 /* For undefined recommended transfer size return -1 in that field */
@@ -1971,14 +2003,39 @@ struct xsymlink {
1971 char path[1024]; 2003 char path[1024];
1972}; 2004};
1973 2005
1974typedef struct { 2006typedef struct file_xattr_info {
1975 /* BB do we need another field for flags? BB */ 2007 /* BB do we need another field for flags? BB */
1976 __u32 xattr_name_len; 2008 __u32 xattr_name_len;
1977 __u32 xattr_value_len; 2009 __u32 xattr_value_len;
1978 char xattr_name[0]; 2010 char xattr_name[0];
1979 /* followed by xattr_value[xattr_value_len], no pad */ 2011 /* followed by xattr_value[xattr_value_len], no pad */
1980} FILE_XATTR_INFO; /* extended attribute, info level 205 */ 2012} FILE_XATTR_INFO; /* extended attribute, info level 0x205 */
1981 2013
2014
2015/* flags for chattr command */
2016#define EXT_SECURE_DELETE 0x00000001 /* EXT3_SECRM_FL */
2017#define EXT_ENABLE_UNDELETE 0x00000002 /* EXT3_UNRM_FL */
2018/* Reserved for compress file 0x4 */
2019#define EXT_SYNCHRONOUS 0x00000008 /* EXT3_SYNC_FL */
2020#define EXT_IMMUTABLE_FL 0x00000010 /* EXT3_IMMUTABLE_FL */
2021#define EXT_OPEN_APPEND_ONLY 0x00000020 /* EXT3_APPEND_FL */
2022#define EXT_DO_NOT_BACKUP 0x00000040 /* EXT3_NODUMP_FL */
2023#define EXT_NO_UPDATE_ATIME 0x00000080 /* EXT3_NOATIME_FL */
2024/* 0x100 through 0x800 reserved for compression flags and are GET-ONLY */
2025#define EXT_HASH_TREE_INDEXED_DIR 0x00001000 /* GET-ONLY EXT3_INDEX_FL */
2026/* 0x2000 reserved for IMAGIC_FL */
2027#define EXT_JOURNAL_THIS_FILE 0x00004000 /* GET-ONLY EXT3_JOURNAL_DATA_FL */
2028/* 0x8000 reserved for EXT3_NOTAIL_FL */
2029#define EXT_SYNCHRONOUS_DIR 0x00010000 /* EXT3_DIRSYNC_FL */
2030#define EXT_TOPDIR 0x00020000 /* EXT3_TOPDIR_FL */
2031
2032#define EXT_SET_MASK 0x000300FF
2033#define EXT_GET_MASK 0x0003DFFF
2034
2035typedef struct file_chattr_info {
2036 __le64 mask; /* list of all possible attribute bits */
2037 __le64 mode; /* list of actual attribute bits on this inode */
2038} FILE_CHATTR_INFO; /* ext attributes (chattr, chflags) level 0x206 */
1982 2039
1983#endif 2040#endif
1984 2041