aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/llite_internal.h
diff options
context:
space:
mode:
authorJinshan Xiong <jinshan.xiong@intel.com>2016-12-02 19:53:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-06 10:47:54 +0100
commit219c0c454bc960d234273bcc2cb509b7fa71db68 (patch)
treef8f9e75b2316362537a76ff6d39c2ccbc9526152 /drivers/staging/lustre/lustre/llite/llite_internal.h
parentstaging: lustre: cl_page: fix a typo in comments (diff)
downloadlinux-dev-219c0c454bc960d234273bcc2cb509b7fa71db68.tar.xz
linux-dev-219c0c454bc960d234273bcc2cb509b7fa71db68.zip
staging: lustre: llite: clear LLIF_DATA_MODIFIED in atomic
This flag should be cleared atomically after the op_data flag MDS_DATA_MODIFIED is packed. Otherwise, if there exists an operation to dirty the file again, the state may be missed on the MDT. Stop using spin lock lli_lock to protect operations of changing file flags; using bit operations instead. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6377 Reviewed-on: http://review.whamcloud.com/14100 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/llite_internal.h')
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_internal.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h
index 50bb32852993..ac4ce059bbc6 100644
--- a/drivers/staging/lustre/lustre/llite/llite_internal.h
+++ b/drivers/staging/lustre/lustre/llite/llite_internal.h
@@ -97,20 +97,20 @@ struct ll_grouplock {
unsigned long lg_gid;
};
-enum lli_flags {
+enum ll_file_flags {
/* File data is modified. */
- LLIF_DATA_MODIFIED = BIT(0),
+ LLIF_DATA_MODIFIED = 0,
/* File is being restored */
- LLIF_FILE_RESTORING = BIT(1),
+ LLIF_FILE_RESTORING = 1,
/* Xattr cache is attached to the file */
- LLIF_XATTR_CACHE = BIT(2),
+ LLIF_XATTR_CACHE = 2,
};
struct ll_inode_info {
__u32 lli_inode_magic;
- __u32 lli_flags;
spinlock_t lli_lock;
+ unsigned long lli_flags;
struct posix_acl *lli_posix_acl;
/* identifying fields for both metadata and data stacks. */
@@ -740,8 +740,6 @@ int ll_file_open(struct inode *inode, struct file *file);
int ll_file_release(struct inode *inode, struct file *file);
int ll_release_openhandle(struct inode *, struct lookup_intent *);
int ll_md_real_close(struct inode *inode, fmode_t fmode);
-void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
- struct lustre_handle *fh);
int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat);
struct posix_acl *ll_get_acl(struct inode *inode, int type);
int ll_migrate(struct inode *parent, struct file *file, int mdtidx,