mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] Lustre compat code removal
@ 2015-07-31 23:42 green
  2015-07-31 23:42 ` [PATCH 1/6] staging/lustre: Drop SEEK_* definition checks green
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

This is take two for the compat stuff removal.

Oleg Drokin (6):
  staging/lustre: Drop SEEK_* definition checks
  staging/lustre: remove unused ll_quota_on and ll_quota_off
  staging/lustre: Drop FMODE_UNSIGNED_OFFSET define
  staging/lustre: Use hlist primitives directly
  staging/lustre: Get rid of ll_pagevec_ macros
  staging/lustre: Get rid of inode_dio_write_done and inode_dio_read

 .../lustre/lustre/include/linux/lustre_compat25.h  | 61 ----------------------
 drivers/staging/lustre/lustre/llite/dcache.c       |  3 +-
 drivers/staging/lustre/lustre/llite/dir.c          |  4 --
 drivers/staging/lustre/lustre/llite/llite_lib.c    |  5 +-
 drivers/staging/lustre/lustre/llite/namei.c        | 10 ++--
 drivers/staging/lustre/lustre/llite/vvp_io.c       |  5 +-
 6 files changed, 8 insertions(+), 80 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/6] staging/lustre: Drop SEEK_* definition checks
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
@ 2015-07-31 23:42 ` green
  2015-07-31 23:42 ` [PATCH 2/6] staging/lustre: remove unused ll_quota_on and ll_quota_off green
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

SEEK_DATA and SEEK_HOLE are always defined in the kernel,
drop the definition checks

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index f16ba9c..502c7cc 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -121,13 +121,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
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/6] staging/lustre: remove unused ll_quota_on and ll_quota_off
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
  2015-07-31 23:42 ` [PATCH 1/6] staging/lustre: Drop SEEK_* definition checks green
@ 2015-07-31 23:42 ` green
  2015-07-31 23:42 ` [PATCH 3/6] staging/lustre: Drop FMODE_UNSIGNED_OFFSET define green
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

They are not used anywhere, so safe to drop.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 .../lustre/lustre/include/linux/lustre_compat25.h  | 31 ----------------------
 1 file changed, 31 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 502c7cc..9739611 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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)
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/6] staging/lustre: Drop FMODE_UNSIGNED_OFFSET define
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
  2015-07-31 23:42 ` [PATCH 1/6] staging/lustre: Drop SEEK_* definition checks green
  2015-07-31 23:42 ` [PATCH 2/6] staging/lustre: remove unused ll_quota_on and ll_quota_off green
@ 2015-07-31 23:42 ` green
  2015-07-31 23:42 ` [PATCH 4/6] staging/lustre: Use hlist primitives directly green
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

It's not really used anywhere.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 9739611..b37856c 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/6] staging/lustre: Use hlist primitives directly
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
                   ` (2 preceding siblings ...)
  2015-07-31 23:42 ` [PATCH 3/6] staging/lustre: Drop FMODE_UNSIGNED_OFFSET define green
@ 2015-07-31 23:42 ` green
  2015-07-31 23:42 ` [PATCH 5/6] staging/lustre: Get rid of ll_pagevec_ macros green
  2015-07-31 23:42 ` [PATCH 6/6] staging/lustre: Get rid of inode_dio_write_done and inode_dio_read green
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

Get rid of ll_d_hlist* compat defines.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 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(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index b37856c..43fa2a9 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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)
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c
index 7b008a6..b866859 100644
--- a/drivers/staging/lustre/lustre/llite/dcache.c
+++ b/drivers/staging/lustre/lustre/llite/dcache.c
@@ -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);
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 2ed1e0a..05e7dc8 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -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,
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/6] staging/lustre: Get rid of ll_pagevec_ macros
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
                   ` (3 preceding siblings ...)
  2015-07-31 23:42 ` [PATCH 4/6] staging/lustre: Use hlist primitives directly green
@ 2015-07-31 23:42 ` green
  2015-07-31 23:42 ` [PATCH 6/6] staging/lustre: Get rid of inode_dio_write_done and inode_dio_read green
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

They are noop anyways.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 5 -----
 drivers/staging/lustre/lustre/llite/dir.c                     | 4 ----
 2 files changed, 9 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 43fa2a9..157bafb 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 3d746a9..769b611 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -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);
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 6/6] staging/lustre: Get rid of inode_dio_write_done and inode_dio_read
  2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
                   ` (4 preceding siblings ...)
  2015-07-31 23:42 ` [PATCH 5/6] staging/lustre: Get rid of ll_pagevec_ macros green
@ 2015-07-31 23:42 ` green
  5 siblings, 0 replies; 7+ messages in thread
From: green @ 2015-07-31 23:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger
  Cc: Linux Kernel Mailing List, Oleg Drokin, Oleg Drokin

From: Oleg Drokin <green@linuxhacker.ru>

These primitives are long deprecated and unused.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 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(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 157bafb..6b14406 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 39f0b2a..55e2dc6 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -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));
 
diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c
index 91bba79..a659962 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_io.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
@@ -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);
 }
 
-- 
2.1.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-31 23:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31 23:42 [PATCH 0/6] Lustre compat code removal green
2015-07-31 23:42 ` [PATCH 1/6] staging/lustre: Drop SEEK_* definition checks green
2015-07-31 23:42 ` [PATCH 2/6] staging/lustre: remove unused ll_quota_on and ll_quota_off green
2015-07-31 23:42 ` [PATCH 3/6] staging/lustre: Drop FMODE_UNSIGNED_OFFSET define green
2015-07-31 23:42 ` [PATCH 4/6] staging/lustre: Use hlist primitives directly green
2015-07-31 23:42 ` [PATCH 5/6] staging/lustre: Get rid of ll_pagevec_ macros green
2015-07-31 23:42 ` [PATCH 6/6] staging/lustre: Get rid of inode_dio_write_done and inode_dio_read green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®