[linux-cifs-client] [PATCH 05/13] cifs: add new cifs_fattr struct
for holding cifs inode attributes in common way
Jeff Layton
jlayton at redhat.com
Mon May 11 20:24:24 GMT 2009
In order to unify some codepaths, introduce a common cifs_fattr struct
for storing inode attributes. The different codepaths (unix, legacy,
normal, etc...) can fill out this struct with inode info. It can then
be passed as an arg to a common set of routines to get and update inodes.
Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
fs/cifs/cifsglob.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index a61ab77..6a0abc0 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -472,6 +472,29 @@ struct dfs_info3_param {
char *node_name;
};
+
+/*
+ * common struct for holding inode info when searching for or updating an
+ * inode with new info
+ */
+
+struct cifs_fattr {
+ u32 cf_flags;
+ u32 cf_cifsattrs;
+ u64 cf_uniqueid;
+ u64 cf_eof;
+ u64 cf_bytes;
+ uid_t cf_uid;
+ gid_t cf_gid;
+ umode_t cf_mode;
+ dev_t cf_rdev;
+ unsigned int cf_nlink;
+ unsigned int cf_dtype;
+ struct timespec cf_atime;
+ struct timespec cf_mtime;
+ struct timespec cf_ctime;
+};
+
static inline void free_dfs_info_param(struct dfs_info3_param *param)
{
if (param) {
--
1.6.0.6
More information about the linux-cifs-client
mailing list