Loading fs/orangefs/devorangefs-req.c +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ /* this file implements the /dev/pvfs2-req device node */ uint32_t orangefs_userspace_version; static int open_access_count; #define DUMP_DEVICE_ERROR() \ Loading Loading @@ -387,6 +389,13 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, return -EPROTO; } if (!orangefs_userspace_version) { orangefs_userspace_version = head.version; } else if (orangefs_userspace_version != head.version) { gossip_err("Error: userspace version changes\n"); return -EPROTO; } /* remove the op from the in progress hash table */ op = orangefs_devreq_remove_op(head.tag); if (!op) { Loading Loading @@ -527,6 +536,7 @@ static int orangefs_devreq_release(struct inode *inode, struct file *file) gossip_debug(GOSSIP_DEV_DEBUG, "pvfs2-client-core: device close complete\n"); open_access_count = 0; orangefs_userspace_version = 0; mutex_unlock(&devreq_mutex); return 0; } Loading fs/orangefs/downcall.h +6 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ struct orangefs_fs_key_response { char fs_key[FS_KEY_BUF_SIZE]; }; /* 2.9.6 */ struct orangefs_features_response { __u64 features; }; struct orangefs_downcall_s { __s32 type; __s32 status; Loading @@ -122,6 +127,7 @@ struct orangefs_downcall_s { struct orangefs_param_response param; struct orangefs_perf_count_response perf_count; struct orangefs_fs_key_response fs_key; struct orangefs_features_response features; } resp; }; Loading fs/orangefs/file.c +8 −5 Original line number Diff line number Diff line Loading @@ -624,11 +624,14 @@ static int orangefs_file_release(struct inode *inode, struct file *file) if (file->f_path.dentry->d_inode && file->f_path.dentry->d_inode->i_mapping && mapping_nrpages(&file->f_path.dentry->d_inode->i_data)) { if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) { gossip_debug(GOSSIP_INODE_DEBUG, "calling flush_racache on %pU\n", get_khandle_from_ino(inode)); flush_racache(inode); gossip_debug(GOSSIP_INODE_DEBUG, "flush_racache finished\n"); gossip_debug(GOSSIP_INODE_DEBUG, "flush_racache finished\n"); } truncate_inode_pages(file->f_path.dentry->d_inode->i_mapping, 0); } Loading fs/orangefs/orangefs-cache.c +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,8 @@ char *get_opname_string(struct orangefs_kernel_op_s *new_op) return "OP_FSYNC"; else if (type == ORANGEFS_VFS_OP_FSKEY) return "OP_FSKEY"; else if (type == ORANGEFS_VFS_OP_FEATURES) return "OP_FEATURES"; } return "OP_UNKNOWN?"; } Loading fs/orangefs/orangefs-dev-proto.h +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ #define ORANGEFS_VFS_OP_FSYNC 0xFF00EE01 #define ORANGEFS_VFS_OP_FSKEY 0xFF00EE02 #define ORANGEFS_VFS_OP_READDIRPLUS 0xFF00EE03 #define ORANGEFS_VFS_OP_FEATURES 0xFF00EE05 /* 2.9.6 */ /* features is a 64-bit unsigned bitmask */ #define ORANGEFS_FEATURE_READAHEAD 1 /* * Misc constants. Please retain them as multiples of 8! Loading Loading
fs/orangefs/devorangefs-req.c +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ /* this file implements the /dev/pvfs2-req device node */ uint32_t orangefs_userspace_version; static int open_access_count; #define DUMP_DEVICE_ERROR() \ Loading Loading @@ -387,6 +389,13 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, return -EPROTO; } if (!orangefs_userspace_version) { orangefs_userspace_version = head.version; } else if (orangefs_userspace_version != head.version) { gossip_err("Error: userspace version changes\n"); return -EPROTO; } /* remove the op from the in progress hash table */ op = orangefs_devreq_remove_op(head.tag); if (!op) { Loading Loading @@ -527,6 +536,7 @@ static int orangefs_devreq_release(struct inode *inode, struct file *file) gossip_debug(GOSSIP_DEV_DEBUG, "pvfs2-client-core: device close complete\n"); open_access_count = 0; orangefs_userspace_version = 0; mutex_unlock(&devreq_mutex); return 0; } Loading
fs/orangefs/downcall.h +6 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ struct orangefs_fs_key_response { char fs_key[FS_KEY_BUF_SIZE]; }; /* 2.9.6 */ struct orangefs_features_response { __u64 features; }; struct orangefs_downcall_s { __s32 type; __s32 status; Loading @@ -122,6 +127,7 @@ struct orangefs_downcall_s { struct orangefs_param_response param; struct orangefs_perf_count_response perf_count; struct orangefs_fs_key_response fs_key; struct orangefs_features_response features; } resp; }; Loading
fs/orangefs/file.c +8 −5 Original line number Diff line number Diff line Loading @@ -624,11 +624,14 @@ static int orangefs_file_release(struct inode *inode, struct file *file) if (file->f_path.dentry->d_inode && file->f_path.dentry->d_inode->i_mapping && mapping_nrpages(&file->f_path.dentry->d_inode->i_data)) { if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) { gossip_debug(GOSSIP_INODE_DEBUG, "calling flush_racache on %pU\n", get_khandle_from_ino(inode)); flush_racache(inode); gossip_debug(GOSSIP_INODE_DEBUG, "flush_racache finished\n"); gossip_debug(GOSSIP_INODE_DEBUG, "flush_racache finished\n"); } truncate_inode_pages(file->f_path.dentry->d_inode->i_mapping, 0); } Loading
fs/orangefs/orangefs-cache.c +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,8 @@ char *get_opname_string(struct orangefs_kernel_op_s *new_op) return "OP_FSYNC"; else if (type == ORANGEFS_VFS_OP_FSKEY) return "OP_FSKEY"; else if (type == ORANGEFS_VFS_OP_FEATURES) return "OP_FEATURES"; } return "OP_UNKNOWN?"; } Loading
fs/orangefs/orangefs-dev-proto.h +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ #define ORANGEFS_VFS_OP_FSYNC 0xFF00EE01 #define ORANGEFS_VFS_OP_FSKEY 0xFF00EE02 #define ORANGEFS_VFS_OP_READDIRPLUS 0xFF00EE03 #define ORANGEFS_VFS_OP_FEATURES 0xFF00EE05 /* 2.9.6 */ /* features is a 64-bit unsigned bitmask */ #define ORANGEFS_FEATURE_READAHEAD 1 /* * Misc constants. Please retain them as multiples of 8! Loading