Removal of lustre compat macros
cover Removal of lustre compat macros
From: Oleg Drokin <[email protected]>
This patchset is a stroll through lustre/include/linux/lustre_compat25.h that houses a bunch of our "compatibility with old/new kernels" code and gettign rid of everything that we know for granted is available because we are part of the tree.
These are the low hanging fruit, the rest are somewhat more tricky and would need some more research.
a different cfs_bio_* compat removal patch was sent to the linux-block tree since they changed the prototype, so if there's a conflict with that, please pick their version.
Oleg Drokin (13):
staging/lustre: Remove unused ll_vfs_* compat defines staging/lustre: get rid of cfs_bio_* compat macroses staging/lustre: Drop FS_HAS_FIEMAP compat macro staging/lustre: Drop SLAB_DESTROY_BY_RCU redefine, it's always defined staging/lustre: remove *hw_segments compat defines staging/lustre: Drop SEEK_* definition checks staging/lustre: Drop FMODE_UNSIGNED_OFFSET define staging/lustre: replace ll_umode_t with umode_t staging/lustre: Use hlist primitives directly staging/lustre: Get rid of ll_pagevec_ macros staging/lustre: ATTR_TIMES_SET is always defined, so don't check it staging/lustre: Get rid of inode_dio_write_done and inode_dio_read staging/lustre: use ATTR_OPEN directly, remove ATTR_RAW
.../lustre/lustre/include/linux/lustre_compat25.h | 119 --------------------- .../lustre/include/linux/lustre_patchless_compat.h | 12 --- drivers/staging/lustre/lustre/llite/dcache.c | 3 +- drivers/staging/lustre/lustre/llite/dir.c | 4 - drivers/staging/lustre/lustre/llite/llite_lib.c | 7 +- drivers/staging/lustre/lustre/llite/lloop.c | 4 +- drivers/staging/lustre/lustre/llite/namei.c | 12 +-- drivers/staging/lustre/lustre/llite/vvp_io.c | 5 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 10 files changed, 15 insertions(+), 155 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/13 staging/lustre: Remove unused ll_vfs_* compat defines
From: Oleg Drokin <[email protected]>
Lustre defines quite a bit of those compatibility defines duplicating kernel vfs api, but they are not actually used in the client so remove them all and also ll_dirty_inode, ll_security_inode_unlink and cfs_path_put
--- .../lustre/lustre/include/linux/lustre_compat25.h | 25 ---------------------- 1 file changed, 25 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -25
@@ -74,22 +74,9 @@#define FS_HAS_FIEMAP (0)#endif -#define ll_vfs_rmdir (dir, entry, mnt) vfs_rmdir(dir, entry) -#define ll_vfs_mkdir (inode, dir, mnt, mode) vfs_mkdir(inode, dir, mode) -#define ll_vfs_link (old, mnt, dir, new, mnt1) vfs_link(old, dir, new) -#define ll_vfs_unlink (inode, entry, mnt) vfs_unlink(inode, entry) -#define ll_vfs_mknod (dir, entry, mnt, mode, dev) \ - vfs_mknod(dir, entry, mode, dev) -#define ll_security_inode_unlink (dir, entry, mnt) \ - security_inode_unlink(dir, entry) -#define ll_vfs_rename (old, old_dir, mnt, new, new_dir, mnt1) \ - vfs_rename(old, old_dir, new, new_dir, NULL, 0) -#define cfs_bio_io_error (a, b) bio_io_error((a))#define cfs_bio_endio (a, b, c) bio_endio((a), (c)) -#define cfs_path_put (nd) path_put(&(nd)->path) -#ifndef SLAB_DESTROY_BY_RCU #define SLAB_DESTROY_BY_RCU 0
@@ -127,14 +114,6 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount) } -# define ll_vfs_dq_init dquot_initialize -# define ll_vfs_dq_drop dquot_drop -# define ll_vfs_dq_transfer dquot_transfer -# define ll_vfs_dq_off (sb, remount) dquot_suspend(sb, -1) - - - -#define queue_max_phys_segments (rq) queue_max_segments(rq)#define queue_max_hw_segments (rq) queue_max_segments(rq)
@@ -194,8 +173,4 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)# define ll_umode_t umode_t -#include <linux/dcache.h> - -# define ll_dirty_inode (inode, flag) (inode)->i_sb->s_op->dirty_inode((inode), flag) -#endif /* _COMPAT25_H */
Signature · 1 line
2.1.0
PATCH 2/13 staging/lustre: get rid of cfs_bio_* compat macroses
In reply to [email protected]From: Oleg Drokin <[email protected]>
This replaces cfs_bio_io_error with direct calls to bio_io_error and cfs_bio_end_io with bio_end_io
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 4 ---- drivers/staging/lustre/lustre/llite/lloop.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -4
@@ -74,10 +74,6 @@#define FS_HAS_FIEMAP (0)#endif -#define cfs_bio_io_error (a, b) bio_io_error((a)) -#define cfs_bio_endio (a, b, c) bio_endio((a), (c)) - -#ifndef SLAB_DESTROY_BY_RCU #define SLAB_DESTROY_BY_RCU 0#endif
drivers/staging/lustre/lustre/llite/lloop.c +2 -2
@@ -365,7 +365,7 @@ static void loop_make_request(struct request_queue *q, struct bio *old_bio)loop_add_bio (lo, old_bio);return ; err: -cfs_bio_io_error (old_bio, old_bio->bi_iter.bi_size); +bio_io_error (old_bio); }
@@ -376,7 +376,7 @@ static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)while (bio) {struct bio *tmp = bio->bi_next; bio->bi_next =NULL ; -cfs_bio_endio (bio, bio->bi_iter.bi_size, ret); +bio_endio (bio, ret); bio = tmp; } }
Signature · 1 line
2.1.0
PATCH 3/13 staging/lustre: Drop FS_HAS_FIEMAP compat macro
In reply to [email protected]From: Oleg Drokin <[email protected]>
FS_HAS_FIEMAP was some sort of old RHEL5 construct that's not really important anymore
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 5 ----- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -5
@@ -69,11 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ - -#ifndef FS_HAS_FIEMAP -#define FS_HAS_FIEMAP (0) -#endif -#ifndef SLAB_DESTROY_BY_RCU #define SLAB_DESTROY_BY_RCU 0#endif
drivers/staging/lustre/lustre/obdclass/obd_mount.c +1 -1
@@ -1281,7 +1281,7 @@ struct file_system_type lustre_fs_type = { .mount = lustre_mount, .kill_sb = lustre_kill_super, .fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV | - FS_HAS_FIEMAP | FS_RENAME_DOES_D_MOVE, + FS_RENAME_DOES_D_MOVE, };MODULE_ALIAS_FS ("lustre" );
Signature · 1 line
2.1.0
PATCH 4/13 staging/lustre: Drop SLAB_DESTROY_BY_RCU redefine, it's always defined
In reply to [email protected]From: Oleg Drokin <[email protected]>
SLAB_DESTROY_BY_RCU is always defined in kernel slab.h, so no point in checking for it.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -6
@@ -69,12 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ -#ifndef SLAB_DESTROY_BY_RCU -#define SLAB_DESTROY_BY_RCU 0 -#endif - - -static inline int ll_quota_on (struct super_block *sb,int off,int ver,char *name,int remount) {
Signature · 1 line
2.1.0
PATCH 5/13 staging/lustre: remove *hw_segments compat defines
In reply to [email protected]From: Oleg Drokin <[email protected]>
queue_max_phys_segments, queue_max_hw_segments and bio_hw_segments are not used anywhere in the client code, so remove them
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -6
@@ -100,10 +100,6 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount) -#define queue_max_phys_segments (rq) queue_max_segments(rq) -#define queue_max_hw_segments (rq) queue_max_segments(rq) - -#define ll_d_hlist_node hlist_node#define ll_d_hlist_empty (list) hlist_empty(list)#define ll_d_hlist_entry (ptr, type, name) hlist_entry(ptr.first, type, name)
@@ -112,8 +108,6 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount) p = NULL; hlist_for_each_entry(dentry, i_dentry, alias) -#define bio_hw_segments (q, bio) 0 -#define ll_pagevec_init (pv, cold) do {} while (0)#define ll_pagevec_add (pv, pg) (0)
Signature · 1 line
2.1.0
PATCH 6/13 staging/lustre: Drop SEEK_* definition checks
In reply to [email protected]From: Oleg Drokin <[email protected]>
SEEK_DATA and SEEK_HOLE are always defined in the kernel, drop the definition checks
--- .../lustre/lustre/include/linux/lustre_compat25.h | 38 ---------------------- 1 file changed, 38 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -38
@@ -69,37 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ -static inline int -ll_quota_on (struct super_block *sb,int off,int ver,char *name,int remount) -{ -int rc; - -if (sb->s_qcop->quota_on) { -struct path path; - - rc =kern_path (name,LOOKUP_FOLLOW , &path); -if (!rc) -return rc; - rc = sb->s_qcop->quota_on (sb, off, ver - , &path - ); -path_put (&path); -return rc; - }else -return -ENOSYS ; -} - -static inline int ll_quota_off (struct super_block *sb,int off,int remount) -{ -if (sb->s_qcop->quota_off) { -return sb->s_qcop->quota_off (sb, off - ); - }else -return -ENOSYS ; -} - - -#define ll_d_hlist_node hlist_node#define ll_d_hlist_empty (list) hlist_empty(list)#define ll_d_hlist_entry (ptr, type, name) hlist_entry(ptr.first, type, name)
@@ -121,13 +90,6 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)# define NO_QUOTA (-EDQUOT)#endif -#ifndef SEEK_DATA -#define SEEK_DATA 3/* seek to the next data */ -#endif -#ifndef SEEK_HOLE -#define SEEK_HOLE 4/* seek to the next hole */ -#endif -#ifndef FMODE_UNSIGNED_OFFSET #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000)#endif
Signature · 1 line
2.1.0
Greg Kroah-Hartman
maintainerRe: [PATCH 06/13] staging/lustre: Drop SEEK_* definition checks
Quoted 39 lines · On Thu, Jul 30, 2015 at 06:27:57PM -0400, [email protected] wrote:
From: Oleg Drokin <[email protected]>
SEEK_DATAandSEEK_HOLEare always defined in the kernel, drop the definition checksSigned-off-by Oleg Drokin <[email protected]>--- .../lustre/lustre/include/linux/lustre_compat25.h | 38 ---------------------- 1 file changed, 38 deletions(-)drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0
-21@@ -69,37 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ -static inline int -ll_quota_on (struct super_block *sb,int off,int ver,char *name,int remount) -{ -int rc; - -if (sb->s_qcop->quota_on) { -struct path path; - - rc =kern_path (name,LOOKUP_FOLLOW , &path); -if (!rc) -return rc; - rc = sb->s_qcop->quota_on (sb, off, ver - , &path - ); -path_put (&path); -return rc; - }else -return -ENOSYS ; -} - -static inline int ll_quota_off (struct super_block *sb,int off,int remount)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h line 102
Quoted 10 lines
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0
-10-{ -if (sb->s_qcop->quota_off) { -return sb->s_qcop->quota_off (sb, off - ); - }else -return -ENOSYS ; -} - - -
This code removal doesn't match up with the changelog text, so I can't take this :(
Re: [PATCH 06/13] staging/lustre: Drop SEEK_* definition checks
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · On Thu, Jul 30, 2015 at 06:27:57PM -0400, [email protected] wrote:
From: Oleg Drokin <[email protected]>
SEEK_DATAandSEEK_HOLEare always defined in the kernel, drop the definition checksThis code removal doesn't match up with the changelog text, so I can't take this :(
Whoops.
A fallover from a mistaken rebase, I guess.
I'll resubmit in a moment.
PATCH 7/13 staging/lustre: Drop FMODE_UNSIGNED_OFFSET define
In reply to [email protected]From: Oleg Drokin <[email protected]>
It's not really used anywhere.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -4
@@ -90,10 +90,6 @@# define NO_QUOTA (-EDQUOT)#endif -#ifndef FMODE_UNSIGNED_OFFSET -#define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) -#endif -#if !defined(_ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_) && !defined(ext2_set_bit)# define ext2_set_bit __test_and_set_bit_le# define ext2_clear_bit __test_and_clear_bit_le
Signature · 1 line
2.1.0
PATCH 8/13 staging/lustre: replace ll_umode_t with umode_t
In reply to [email protected]From: Oleg Drokin <[email protected]>
umode_t is what we need anyway, so replace all users and drop the define.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 6 ------ drivers/staging/lustre/lustre/llite/namei.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -6
@@ -104,10 +104,4 @@# define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET)#endif - -#include <linux/version.h> -#include <linux/fs.h> - -# define ll_umode_t umode_t -#endif /* _COMPAT25_H */
drivers/staging/lustre/lustre/llite/namei.c +1 -1
@@ -1008,7 +1008,7 @@ static int ll_unlink(struct inode *dir, struct dentry *dentry)return rc; } -static int ll_mkdir (struct inode *dir,struct dentry *dentry,ll_umode_t mode) +static int ll_mkdir (struct inode *dir,struct dentry *dentry,umode_t mode) {int err;
Signature · 1 line
2.1.0
PATCH 9/13 staging/lustre: Use hlist primitives directly
In reply to [email protected]From: Oleg Drokin <[email protected]>
Get rid of ll_d_hlist* compat defines.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 9 --------- drivers/staging/lustre/lustre/llite/dcache.c | 3 +-- drivers/staging/lustre/lustre/llite/namei.c | 10 ++++------ 3 files changed, 5 insertions(+), 17 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -9
@@ -69,15 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ -#define ll_d_hlist_node hlist_node -#define ll_d_hlist_empty (list) hlist_empty(list) -#define ll_d_hlist_entry (ptr, type, name) hlist_entry(ptr.first, type, name) -#define ll_d_hlist_for_each (tmp, i_dentry) hlist_for_each(tmp, i_dentry) -#define ll_d_hlist_for_each_entry (dentry, p, i_dentry, alias) \ - p = NULL; hlist_for_each_entry(dentry, i_dentry, alias) - - -#define ll_pagevec_init (pv, cold) do {} while (0)#define ll_pagevec_add (pv, pg) (0)#define ll_pagevec_lru_add_file (pv) do {} while (0)
drivers/staging/lustre/lustre/llite/dcache.c +1 -2
@@ -250,7 +250,6 @@ void ll_intent_release(struct lookup_intent *it)void ll_invalidate_aliases (struct inode *inode) {struct dentry *dentry; -struct ll_d_hlist_node *p;LASSERT (inode !=NULL );
@@ -258,7 +257,7 @@ void ll_invalidate_aliases(struct inode *inode) inode->i_ino, inode->i_generation, inode);ll_lock_dcache (inode); -ll_d_hlist_for_each_entry (dentry, p, &inode->i_dentry, d_u.d_alias) { +hlist_for_each_entry (dentry, &inode->i_dentry, d_u.d_alias) {CDEBUG (D_DENTRY ,"dentry in drop %pd (%p) parent %p inode %p flags %d\n" , dentry, dentry, dentry->d_parent,d_inode (dentry), dentry->d_flags);
drivers/staging/lustre/lustre/llite/namei.c +4 -6
@@ -144,10 +144,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,static void ll_invalidate_negative_children (struct inode *dir) {struct dentry *dentry, *tmp_subdir; -struct ll_d_hlist_node *p;ll_lock_dcache (dir); -ll_d_hlist_for_each_entry (dentry, p, &dir->i_dentry, d_u.d_alias) { +hlist_for_each_entry (dentry, &dir->i_dentry, d_u.d_alias) {spin_lock (&dentry->d_lock);if (!list_empty (&dentry->d_subdirs)) {struct dentry *child;
@@ -334,15 +333,14 @@ void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2)static struct dentry *ll_find_alias (struct inode *inode,struct dentry *dentry) {struct dentry *alias, *discon_alias, *invalid_alias; -struct ll_d_hlist_node *p; -if (ll_d_hlist_empty (&inode->i_dentry)) +if (hlist_empty (&inode->i_dentry))return NULL ; discon_alias = invalid_alias =NULL ;ll_lock_dcache (inode); -ll_d_hlist_for_each_entry (alias, p, &inode->i_dentry, d_u.d_alias) { +hlist_for_each_entry (alias, &inode->i_dentry, d_u.d_alias) {LASSERT (alias != dentry);spin_lock (&alias->d_lock);
@@ -690,7 +688,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) goto out; } -LASSERT (ll_d_hlist_empty (&inode->i_dentry)); +LASSERT (hlist_empty (&inode->i_dentry));/* We asked for a lock on the directory, but were granted a * lock on the inode. Since we finally have an inode pointer,
Signature · 1 line
2.1.0
PATCH 10/13 staging/lustre: Get rid of ll_pagevec_ macros
In reply to [email protected]From: Oleg Drokin <[email protected]>
They are noop anyways.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 5 ----- drivers/staging/lustre/lustre/llite/dir.c | 4 ---- 2 files changed, 9 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -5
@@ -69,11 +69,6 @@# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count)/* inode_dio_done(i) use as-is for read unlock */ -#define ll_pagevec_init (pv, cold) do {} while (0) -#define ll_pagevec_add (pv, pg) (0) -#define ll_pagevec_lru_add_file (pv) do {} while (0) - -#ifndef QUOTA_OK # define QUOTA_OK 0#endif
drivers/staging/lustre/lustre/llite/dir.c +0 -4
@@ -203,7 +203,6 @@ static int ll_dir_filler(void *_hash, struct page *page0)CDEBUG (D_VFSTRACE ,"read %d/%d pages\n" , nrdpgs, npages); -ll_pagevec_init (&lru_pvec,0 );for (i =1 ; i < npages; i++) {unsigned long offset;int ret;
@@ -228,15 +227,12 @@ static int ll_dir_filler(void *_hash, struct page *page0) GFP_KERNEL);if (ret ==0 ) {unlock_page (page); -if (ll_pagevec_add (&lru_pvec, page) ==0 ) -ll_pagevec_lru_add_file (&lru_pvec); }else {CDEBUG (D_VFSTRACE ,"page %lu add to page cache failed: %d\n" , offset, ret); }page_cache_release (page); } -ll_pagevec_lru_add_file (&lru_pvec);if (page_pool != &page0)kfree (page_pool);
Signature · 1 line
2.1.0
PATCH 11/13 staging/lustre: ATTR_TIMES_SET is always defined, so don't check it
In reply to [email protected]From: Oleg Drokin <[email protected]>
Remove ATTR_TIMES_SET check as it's always present, move the mask of times define close to where it's used.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 6 ------ drivers/staging/lustre/lustre/llite/llite_lib.c | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -6
@@ -84,10 +84,4 @@# define ext2_find_next_zero_bit find_next_zero_bit_le#endif -#ifdef ATTR_TIMES_SET -# define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) -#else -# define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET) -#endif -#endif /* _COMPAT25_H */
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -0
@@ -1150,6 +1150,8 @@ void ll_clear_inode(struct inode *inode) lli->lli_has_smd = false; } +#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) +static int ll_md_setattr (struct dentry *dentry,struct md_op_data *op_data,struct md_open_data **mod) {
Signature · 1 line
2.1.0
PATCH 12/13 staging/lustre: Get rid of inode_dio_write_done and inode_dio_read
In reply to [email protected]From: Oleg Drokin <[email protected]>
These primitives are long deprecated and unused.
--- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 5 ----- drivers/staging/lustre/lustre/llite/llite_lib.c | 5 +---- drivers/staging/lustre/lustre/llite/vvp_io.c | 5 ++--- 3 files changed, 3 insertions(+), 12 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -5
@@ -64,11 +64,6 @@#define LTIME_S (time) (time.tv_sec) -/* inode_dio_wait(i) use as-is for write lock */ -# define inode_dio_write_done (i) do {} while (0)/* for write unlock */ -# define inode_dio_read (i) atomic_inc(&(i)->i_dio_count) -/* inode_dio_done(i) use as-is for read unlock */ -#ifndef QUOTA_OK # define QUOTA_OK 0#endif
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -4
@@ -1356,11 +1356,8 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)if (!op_data)return -ENOMEM ; -if (!S_ISDIR (inode->i_mode)) { -if (attr->ia_valid &ATTR_SIZE ) -inode_dio_write_done (inode); +if (!S_ISDIR (inode->i_mode))mutex_unlock (&inode->i_mutex); - }memcpy (&op_data->op_attr, attr,sizeof (*attr));
drivers/staging/lustre/lustre/llite/vvp_io.c +2 -3
@@ -455,12 +455,11 @@ static void vvp_io_setattr_end(const struct lu_env *env,struct cl_io *io = ios->cis_io;struct inode *inode =ccc_object_inode (io->ci_obj); -if (cl_io_is_trunc (io)) { +if (cl_io_is_trunc (io))/* Truncate in memory pages - they must be clean pages * because osc has already notified to destroy osc_extents. */ vvp_do_vmtruncate (inode, io->u.ci_setattr.sa_attr.lvb_size); -inode_dio_write_done (inode); - } +mutex_unlock (&inode->i_mutex); }
Signature · 1 line
2.1.0
PATCH 13/13 staging/lustre: use ATTR_OPEN directly, remove ATTR_RAW
In reply to [email protected]From: Oleg Drokin <[email protected]>
ATTR_RAW is unused.
No point in redefining ATTR_OPEN as ATTR_FROM_OPEN
--- .../lustre/lustre/include/linux/lustre_patchless_compat.h | 12 ------------ drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h +0 -12
@@ -60,18 +60,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page)ll_delete_from_page_cache (page); } -#ifdef ATTR_OPEN -# define ATTR_FROM_OPEN ATTR_OPEN -#else -# ifndef ATTR_FROM_OPEN -# define ATTR_FROM_OPEN 0 -# endif -#endif /* ATTR_OPEN */ - -#ifndef ATTR_RAW -#define ATTR_RAW 0 -#endif -#ifndef ATTR_CTIME_SET /* * set ATTR_CTIME_SET to a high value to avoid any risk of collision with other
drivers/staging/lustre/lustre/mdc/mdc_lib.c +1 -1
@@ -286,7 +286,7 @@ static inline __u64 attr_pack(unsigned int ia_valid) sa_valid |=MDS_ATTR_KILL_SGID ;if (ia_valid &ATTR_CTIME_SET ) sa_valid |=MDS_ATTR_CTIME_SET ; -if (ia_valid &ATTR_FROM_OPEN ) +if (ia_valid &ATTR_OPEN ) sa_valid |=MDS_ATTR_FROM_OPEN ;if (ia_valid &ATTR_BLOCKS ) sa_valid |=MDS_ATTR_BLOCKS ;
Signature · 1 line
2.1.0
Greg Kroah-Hartman
maintainerQuoted 9 lines · On Thu, Jul 30, 2015 at 06:27:51PM -0400, [email protected] wrote:
From: Oleg Drokin <[email protected]>
This patchset is a stroll through
lustre/include/linux/lustre_compat25.hthat houses a bunch of our "compatibility with old/new kernels" code and gettign rid of everything that we know for granted is available because we are part of the tree.These are the low hanging fruit, the rest are somewhat more tricky and would need some more research.
I applied some of these, please fix up the changelog entry (or break it up into 2 patches) for that one patch, and resend that and the remaining ones.
thanks,
greg k-h