* [PATCH] xfs: remove xfs_inew_wait
@ 2021-11-15 9:56 Christoph Hellwig
2021-11-15 14:26 ` Brian Foster
2021-11-17 5:35 ` Darrick J. Wong
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-11-15 9:56 UTC (permalink / raw)
To: linux-xfs; +Cc: kernel test robot
With the remove of xfs_dqrele_all_inodes, xfs_inew_wait and all the
infrastructure used to wake the XFS_INEW bit waitqueue is unused.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 777eb1fa857e ("xfs: remove xfs_dqrele_all_inodes")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_icache.c | 21 ---------------------
fs/xfs/xfs_inode.h | 4 +---
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index e1472004170e8..da4af2142a2b4 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -289,22 +289,6 @@ xfs_perag_clear_inode_tag(
trace_xfs_perag_clear_inode_tag(mp, pag->pag_agno, tag, _RET_IP_);
}
-static inline void
-xfs_inew_wait(
- struct xfs_inode *ip)
-{
- wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
- DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
-
- do {
- prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
- if (!xfs_iflags_test(ip, XFS_INEW))
- break;
- schedule();
- } while (true);
- finish_wait(wq, &wait.wq_entry);
-}
-
/*
* When we recycle a reclaimable inode, we need to re-initialise the VFS inode
* part of the structure. This is made more complex by the fact we store
@@ -368,18 +352,13 @@ xfs_iget_recycle(
ASSERT(!rwsem_is_locked(&inode->i_rwsem));
error = xfs_reinit_inode(mp, inode);
if (error) {
- bool wake;
-
/*
* Re-initializing the inode failed, and we are in deep
* trouble. Try to re-add it to the reclaim list.
*/
rcu_read_lock();
spin_lock(&ip->i_flags_lock);
- wake = !!__xfs_iflags_test(ip, XFS_INEW);
ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
- if (wake)
- wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
spin_unlock(&ip->i_flags_lock);
rcu_read_unlock();
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index e635a3d64cba2..c447bf04205a8 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -231,8 +231,7 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
#define XFS_IRECLAIM (1 << 0) /* started reclaiming this inode */
#define XFS_ISTALE (1 << 1) /* inode has been staled */
#define XFS_IRECLAIMABLE (1 << 2) /* inode can be reclaimed */
-#define __XFS_INEW_BIT 3 /* inode has just been allocated */
-#define XFS_INEW (1 << __XFS_INEW_BIT)
+#define XFS_INEW (1 << 3) /* inode has just been allocated */
#define XFS_IPRESERVE_DM_FIELDS (1 << 4) /* has legacy DMAPI fields set */
#define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
#define XFS_IDIRTY_RELEASE (1 << 6) /* dirty release already seen */
@@ -492,7 +491,6 @@ static inline void xfs_finish_inode_setup(struct xfs_inode *ip)
xfs_iflags_clear(ip, XFS_INEW);
barrier();
unlock_new_inode(VFS_I(ip));
- wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
}
static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: remove xfs_inew_wait
2021-11-15 9:56 [PATCH] xfs: remove xfs_inew_wait Christoph Hellwig
@ 2021-11-15 14:26 ` Brian Foster
2021-11-17 5:35 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Brian Foster @ 2021-11-15 14:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, kernel test robot
On Mon, Nov 15, 2021 at 10:56:43AM +0100, Christoph Hellwig wrote:
> With the remove of xfs_dqrele_all_inodes, xfs_inew_wait and all the
> infrastructure used to wake the XFS_INEW bit waitqueue is unused.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 777eb1fa857e ("xfs: remove xfs_dqrele_all_inodes")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_icache.c | 21 ---------------------
> fs/xfs/xfs_inode.h | 4 +---
> 2 files changed, 1 insertion(+), 24 deletions(-)
>
> diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> index e1472004170e8..da4af2142a2b4 100644
> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -289,22 +289,6 @@ xfs_perag_clear_inode_tag(
> trace_xfs_perag_clear_inode_tag(mp, pag->pag_agno, tag, _RET_IP_);
> }
>
> -static inline void
> -xfs_inew_wait(
> - struct xfs_inode *ip)
> -{
> - wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
> - DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
> -
> - do {
> - prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
> - if (!xfs_iflags_test(ip, XFS_INEW))
> - break;
> - schedule();
> - } while (true);
> - finish_wait(wq, &wait.wq_entry);
> -}
> -
> /*
> * When we recycle a reclaimable inode, we need to re-initialise the VFS inode
> * part of the structure. This is made more complex by the fact we store
> @@ -368,18 +352,13 @@ xfs_iget_recycle(
> ASSERT(!rwsem_is_locked(&inode->i_rwsem));
> error = xfs_reinit_inode(mp, inode);
> if (error) {
> - bool wake;
> -
> /*
> * Re-initializing the inode failed, and we are in deep
> * trouble. Try to re-add it to the reclaim list.
> */
> rcu_read_lock();
> spin_lock(&ip->i_flags_lock);
> - wake = !!__xfs_iflags_test(ip, XFS_INEW);
> ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
> - if (wake)
> - wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
> ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
> spin_unlock(&ip->i_flags_lock);
> rcu_read_unlock();
> diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
> index e635a3d64cba2..c447bf04205a8 100644
> --- a/fs/xfs/xfs_inode.h
> +++ b/fs/xfs/xfs_inode.h
> @@ -231,8 +231,7 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
> #define XFS_IRECLAIM (1 << 0) /* started reclaiming this inode */
> #define XFS_ISTALE (1 << 1) /* inode has been staled */
> #define XFS_IRECLAIMABLE (1 << 2) /* inode can be reclaimed */
> -#define __XFS_INEW_BIT 3 /* inode has just been allocated */
> -#define XFS_INEW (1 << __XFS_INEW_BIT)
> +#define XFS_INEW (1 << 3) /* inode has just been allocated */
> #define XFS_IPRESERVE_DM_FIELDS (1 << 4) /* has legacy DMAPI fields set */
> #define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
> #define XFS_IDIRTY_RELEASE (1 << 6) /* dirty release already seen */
> @@ -492,7 +491,6 @@ static inline void xfs_finish_inode_setup(struct xfs_inode *ip)
> xfs_iflags_clear(ip, XFS_INEW);
> barrier();
> unlock_new_inode(VFS_I(ip));
> - wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
> }
>
> static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: remove xfs_inew_wait
2021-11-15 9:56 [PATCH] xfs: remove xfs_inew_wait Christoph Hellwig
2021-11-15 14:26 ` Brian Foster
@ 2021-11-17 5:35 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-11-17 5:35 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, kernel test robot
On Mon, Nov 15, 2021 at 10:56:43AM +0100, Christoph Hellwig wrote:
> With the remove of xfs_dqrele_all_inodes, xfs_inew_wait and all the
> infrastructure used to wake the XFS_INEW bit waitqueue is unused.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 777eb1fa857e ("xfs: remove xfs_dqrele_all_inodes")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Assuming we don't just immediately add something like this back for that
symlink rcu lookup whateverthatisnotfollowingatall reported elsewhere,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_icache.c | 21 ---------------------
> fs/xfs/xfs_inode.h | 4 +---
> 2 files changed, 1 insertion(+), 24 deletions(-)
>
> diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> index e1472004170e8..da4af2142a2b4 100644
> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -289,22 +289,6 @@ xfs_perag_clear_inode_tag(
> trace_xfs_perag_clear_inode_tag(mp, pag->pag_agno, tag, _RET_IP_);
> }
>
> -static inline void
> -xfs_inew_wait(
> - struct xfs_inode *ip)
> -{
> - wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
> - DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
> -
> - do {
> - prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
> - if (!xfs_iflags_test(ip, XFS_INEW))
> - break;
> - schedule();
> - } while (true);
> - finish_wait(wq, &wait.wq_entry);
> -}
> -
> /*
> * When we recycle a reclaimable inode, we need to re-initialise the VFS inode
> * part of the structure. This is made more complex by the fact we store
> @@ -368,18 +352,13 @@ xfs_iget_recycle(
> ASSERT(!rwsem_is_locked(&inode->i_rwsem));
> error = xfs_reinit_inode(mp, inode);
> if (error) {
> - bool wake;
> -
> /*
> * Re-initializing the inode failed, and we are in deep
> * trouble. Try to re-add it to the reclaim list.
> */
> rcu_read_lock();
> spin_lock(&ip->i_flags_lock);
> - wake = !!__xfs_iflags_test(ip, XFS_INEW);
> ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
> - if (wake)
> - wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
> ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
> spin_unlock(&ip->i_flags_lock);
> rcu_read_unlock();
> diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
> index e635a3d64cba2..c447bf04205a8 100644
> --- a/fs/xfs/xfs_inode.h
> +++ b/fs/xfs/xfs_inode.h
> @@ -231,8 +231,7 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
> #define XFS_IRECLAIM (1 << 0) /* started reclaiming this inode */
> #define XFS_ISTALE (1 << 1) /* inode has been staled */
> #define XFS_IRECLAIMABLE (1 << 2) /* inode can be reclaimed */
> -#define __XFS_INEW_BIT 3 /* inode has just been allocated */
> -#define XFS_INEW (1 << __XFS_INEW_BIT)
> +#define XFS_INEW (1 << 3) /* inode has just been allocated */
> #define XFS_IPRESERVE_DM_FIELDS (1 << 4) /* has legacy DMAPI fields set */
> #define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
> #define XFS_IDIRTY_RELEASE (1 << 6) /* dirty release already seen */
> @@ -492,7 +491,6 @@ static inline void xfs_finish_inode_setup(struct xfs_inode *ip)
> xfs_iflags_clear(ip, XFS_INEW);
> barrier();
> unlock_new_inode(VFS_I(ip));
> - wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
> }
>
> static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-17 5:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 9:56 [PATCH] xfs: remove xfs_inew_wait Christoph Hellwig
2021-11-15 14:26 ` Brian Foster
2021-11-17 5:35 ` Darrick J. Wong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.