linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fuse: limit debug log output during ring teardown
@ 2025-12-04  2:32 Long Li
  2025-12-08 22:50 ` Bernd Schubert
  0 siblings, 1 reply; 3+ messages in thread
From: Long Li @ 2025-12-04  2:32 UTC (permalink / raw)
  To: miklos; +Cc: linux-fsdevel, bschubert, leo.lilong, yangerkun, lonuxli.64

Currently, if there are pending entries in the queue after the teardown
timeout, the system keeps printing entry state information at very short
intervals (FUSE_URING_TEARDOWN_INTERVAL). This can flood the system logs.
Additionally, ring->stop_debug_log is set but not used.

Clean up unused ring->stop_debug_log, update teardown time after each
log entry state, and change the log entry state interval to
FUSE_URING_TEARDOWN_TIMEOUT.

Signed-off-by: Long Li <leo.lilong@huawei.com>
---
v1->v2: Update teardown time to limit entry state output interval
 fs/fuse/dev_uring.c   | 7 ++++---
 fs/fuse/dev_uring_i.h | 5 -----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index 5ceb217ced1b..68d2fbdc3a7c 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -426,7 +426,6 @@ static void fuse_uring_log_ent_state(struct fuse_ring *ring)
 		}
 		spin_unlock(&queue->lock);
 	}
-	ring->stop_debug_log = 1;
 }
 
 static void fuse_uring_async_stop_queues(struct work_struct *work)
@@ -453,9 +452,11 @@ static void fuse_uring_async_stop_queues(struct work_struct *work)
 	 * If there are still queue references left
 	 */
 	if (atomic_read(&ring->queue_refs) > 0) {
-		if (time_after(jiffies,
-			       ring->teardown_time + FUSE_URING_TEARDOWN_TIMEOUT))
+		if (time_after(jiffies, ring->teardown_time +
+					FUSE_URING_TEARDOWN_TIMEOUT)) {
 			fuse_uring_log_ent_state(ring);
+			ring->teardown_time = jiffies;
+		}
 
 		schedule_delayed_work(&ring->async_teardown_work,
 				      FUSE_URING_TEARDOWN_INTERVAL);
diff --git a/fs/fuse/dev_uring_i.h b/fs/fuse/dev_uring_i.h
index 51a563922ce1..4cd3cbd51c7a 100644
--- a/fs/fuse/dev_uring_i.h
+++ b/fs/fuse/dev_uring_i.h
@@ -117,11 +117,6 @@ struct fuse_ring {
 
 	struct fuse_ring_queue **queues;
 
-	/*
-	 * Log ring entry states on stop when entries cannot be released
-	 */
-	unsigned int stop_debug_log : 1;
-
 	wait_queue_head_t stop_waitq;
 
 	/* async tear down */
-- 
2.39.2


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

* Re: [PATCH v2] fuse: limit debug log output during ring teardown
  2025-12-04  2:32 [PATCH v2] fuse: limit debug log output during ring teardown Long Li
@ 2025-12-08 22:50 ` Bernd Schubert
  2025-12-09  1:21   ` Long Li
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Schubert @ 2025-12-08 22:50 UTC (permalink / raw)
  To: Long Li, miklos; +Cc: linux-fsdevel, bschubert, yangerkun, lonuxli.64



On 12/4/25 03:32, Long Li wrote:
> Currently, if there are pending entries in the queue after the teardown
> timeout, the system keeps printing entry state information at very short
> intervals (FUSE_URING_TEARDOWN_INTERVAL). This can flood the system logs.
> Additionally, ring->stop_debug_log is set but not used.
> 
> Clean up unused ring->stop_debug_log, update teardown time after each
> log entry state, and change the log entry state interval to
> FUSE_URING_TEARDOWN_TIMEOUT.
> 
> Signed-off-by: Long Li <leo.lilong@huawei.com>
> ---
> v1->v2: Update teardown time to limit entry state output interval
>  fs/fuse/dev_uring.c   | 7 ++++---
>  fs/fuse/dev_uring_i.h | 5 -----
>  2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> index 5ceb217ced1b..68d2fbdc3a7c 100644
> --- a/fs/fuse/dev_uring.c
> +++ b/fs/fuse/dev_uring.c
> @@ -426,7 +426,6 @@ static void fuse_uring_log_ent_state(struct fuse_ring *ring)
>  		}
>  		spin_unlock(&queue->lock);
>  	}
> -	ring->stop_debug_log = 1;
>  }
>  
>  static void fuse_uring_async_stop_queues(struct work_struct *work)
> @@ -453,9 +452,11 @@ static void fuse_uring_async_stop_queues(struct work_struct *work)
>  	 * If there are still queue references left
>  	 */
>  	if (atomic_read(&ring->queue_refs) > 0) {
> -		if (time_after(jiffies,
> -			       ring->teardown_time + FUSE_URING_TEARDOWN_TIMEOUT))
> +		if (time_after(jiffies, ring->teardown_time +
> +					FUSE_URING_TEARDOWN_TIMEOUT)) {
>  			fuse_uring_log_ent_state(ring);
> +			ring->teardown_time = jiffies;
> +		}
>  
>  		schedule_delayed_work(&ring->async_teardown_work,
>  				      FUSE_URING_TEARDOWN_INTERVAL);
> diff --git a/fs/fuse/dev_uring_i.h b/fs/fuse/dev_uring_i.h
> index 51a563922ce1..4cd3cbd51c7a 100644
> --- a/fs/fuse/dev_uring_i.h
> +++ b/fs/fuse/dev_uring_i.h
> @@ -117,11 +117,6 @@ struct fuse_ring {
>  
>  	struct fuse_ring_queue **queues;
>  
> -	/*
> -	 * Log ring entry states on stop when entries cannot be released
> -	 */
> -	unsigned int stop_debug_log : 1;
> -
>  	wait_queue_head_t stop_waitq;
>  
>  	/* async tear down */


Thank you! I'm still interested in, if you get repeated warning messages.

Reviewed-by: Bernd Schubert <bschubert@ddn.com>

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

* Re: [PATCH v2] fuse: limit debug log output during ring teardown
  2025-12-08 22:50 ` Bernd Schubert
@ 2025-12-09  1:21   ` Long Li
  0 siblings, 0 replies; 3+ messages in thread
From: Long Li @ 2025-12-09  1:21 UTC (permalink / raw)
  To: Bernd Schubert, miklos; +Cc: linux-fsdevel, bschubert, yangerkun, lonuxli.64

On Mon, Dec 08, 2025 at 11:50:11PM +0100, Bernd Schubert wrote:
> 
> 
> On 12/4/25 03:32, Long Li wrote:
> > Currently, if there are pending entries in the queue after the teardown
> > timeout, the system keeps printing entry state information at very short
> > intervals (FUSE_URING_TEARDOWN_INTERVAL). This can flood the system logs.
> > Additionally, ring->stop_debug_log is set but not used.
> > 
> > Clean up unused ring->stop_debug_log, update teardown time after each
> > log entry state, and change the log entry state interval to
> > FUSE_URING_TEARDOWN_TIMEOUT.
> > 
> > Signed-off-by: Long Li <leo.lilong@huawei.com>
> > ---
> > v1->v2: Update teardown time to limit entry state output interval
> >  fs/fuse/dev_uring.c   | 7 ++++---
> >  fs/fuse/dev_uring_i.h | 5 -----
> >  2 files changed, 4 insertions(+), 8 deletions(-)
> > 
> > diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> > index 5ceb217ced1b..68d2fbdc3a7c 100644
> > --- a/fs/fuse/dev_uring.c
> > +++ b/fs/fuse/dev_uring.c
> > @@ -426,7 +426,6 @@ static void fuse_uring_log_ent_state(struct fuse_ring *ring)
> >  		}
> >  		spin_unlock(&queue->lock);
> >  	}
> > -	ring->stop_debug_log = 1;
> >  }
> >  
> >  static void fuse_uring_async_stop_queues(struct work_struct *work)
> > @@ -453,9 +452,11 @@ static void fuse_uring_async_stop_queues(struct work_struct *work)
> >  	 * If there are still queue references left
> >  	 */
> >  	if (atomic_read(&ring->queue_refs) > 0) {
> > -		if (time_after(jiffies,
> > -			       ring->teardown_time + FUSE_URING_TEARDOWN_TIMEOUT))
> > +		if (time_after(jiffies, ring->teardown_time +
> > +					FUSE_URING_TEARDOWN_TIMEOUT)) {
> >  			fuse_uring_log_ent_state(ring);
> > +			ring->teardown_time = jiffies;
> > +		}
> >  
> >  		schedule_delayed_work(&ring->async_teardown_work,
> >  				      FUSE_URING_TEARDOWN_INTERVAL);
> > diff --git a/fs/fuse/dev_uring_i.h b/fs/fuse/dev_uring_i.h
> > index 51a563922ce1..4cd3cbd51c7a 100644
> > --- a/fs/fuse/dev_uring_i.h
> > +++ b/fs/fuse/dev_uring_i.h
> > @@ -117,11 +117,6 @@ struct fuse_ring {
> >  
> >  	struct fuse_ring_queue **queues;
> >  
> > -	/*
> > -	 * Log ring entry states on stop when entries cannot be released
> > -	 */
> > -	unsigned int stop_debug_log : 1;
> > -
> >  	wait_queue_head_t stop_waitq;
> >  
> >  	/* async tear down */
> 
> 
> Thank you! I'm still interested in, if you get repeated warning messages.
> 

I've been testing the fuse over uring functionality recently, but I haven't
encountered many repeated warning messages in actual testing, so there's no
need to worry. :)

Thanks,
Long Li

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

end of thread, other threads:[~2025-12-09  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  2:32 [PATCH v2] fuse: limit debug log output during ring teardown Long Li
2025-12-08 22:50 ` Bernd Schubert
2025-12-09  1:21   ` Long Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).