public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Revert "nfsrahead: enable event-driven mountinfo monitoring"
@ 2026-03-06 21:52 Steve Dickson
  2026-03-06 22:10 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2026-03-06 21:52 UTC (permalink / raw)
  To: Linux NFS Mailing list

This reverts commit 2b62ac4c273a647df07400dc1126fceb76ad96c0.

Most blktests block/ failed with "Timed out while waiting for
udev queue to empty." [1]

[1] https://lore.kernel.org/linux-block/CAHj4cs8URj2fJ7KyP9ViAm6npVOaMiAErnw2uFyPYEU2wb7G_w@mail.gmail.com/T/#t
---
 tools/nfsrahead/main.c | 35 +----------------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

diff --git a/tools/nfsrahead/main.c b/tools/nfsrahead/main.c
index 64953346..b7b889ff 100644
--- a/tools/nfsrahead/main.c
+++ b/tools/nfsrahead/main.c
@@ -16,7 +16,6 @@
 
 #define CONF_NAME "nfsrahead"
 #define NFS_DEFAULT_READAHEAD 128
-#define MNT_NM_TIMEOUT 10000
 
 /* Device information from the system */
 struct device_info {
@@ -118,39 +117,7 @@ out_free_device_info:
 
 static int get_device_info(const char *device_number, struct device_info *device_info)
 {
-	int ret;
-	struct libmnt_monitor *mn = NULL;
-	int timeout_ms = MNT_NM_TIMEOUT;
-
-	ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
-	if (ret == 0)
-		return 0;
-
-	mn = mnt_new_monitor();
-	if (!mn)
-		goto fallback;
-
-	if (mnt_monitor_enable_kernel(mn, 1) < 0) {
-		mnt_unref_monitor(mn);
-		goto fallback;
-	}
-
-	while (timeout_ms > 0) {
-		int rc = mnt_monitor_wait(mn, timeout_ms);
-		if (rc > 0) {
-			ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
-			if (ret == 0) {
-				mnt_unref_monitor(mn);
-				return 0;
-			}
-		} else {
-			break;
-		}
-	}
-	mnt_unref_monitor(mn);
-	return ret;
-
-fallback:
+	int ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
 	for (int retry_count = 0; retry_count < 5 && ret != 0; retry_count++) {
 		usleep(50000);
 		ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
-- 
2.53.0


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

* Re: [PATCH v2] Revert "nfsrahead: enable event-driven mountinfo monitoring"
  2026-03-06 21:52 [PATCH v2] Revert "nfsrahead: enable event-driven mountinfo monitoring" Steve Dickson
@ 2026-03-06 22:10 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2026-03-06 22:10 UTC (permalink / raw)
  To: Linux NFS Mailing list



On 3/6/26 4:52 PM, Steve Dickson wrote:
> This reverts commit 2b62ac4c273a647df07400dc1126fceb76ad96c0.
> 
> Most blktests block/ failed with "Timed out while waiting for
> udev queue to empty." [1]
> 
> [1] https://lore.kernel.org/linux-block/CAHj4cs8URj2fJ7KyP9ViAm6npVOaMiAErnw2uFyPYEU2wb7G_w@mail.gmail.com/T/#t

Committed... (tag: nfs-utils-2-8-6-rc4)

steved.
> ---
>   tools/nfsrahead/main.c | 35 +----------------------------------
>   1 file changed, 1 insertion(+), 34 deletions(-)
> 
> diff --git a/tools/nfsrahead/main.c b/tools/nfsrahead/main.c
> index 64953346..b7b889ff 100644
> --- a/tools/nfsrahead/main.c
> +++ b/tools/nfsrahead/main.c
> @@ -16,7 +16,6 @@
>   
>   #define CONF_NAME "nfsrahead"
>   #define NFS_DEFAULT_READAHEAD 128
> -#define MNT_NM_TIMEOUT 10000
>   
>   /* Device information from the system */
>   struct device_info {
> @@ -118,39 +117,7 @@ out_free_device_info:
>   
>   static int get_device_info(const char *device_number, struct device_info *device_info)
>   {
> -	int ret;
> -	struct libmnt_monitor *mn = NULL;
> -	int timeout_ms = MNT_NM_TIMEOUT;
> -
> -	ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
> -	if (ret == 0)
> -		return 0;
> -
> -	mn = mnt_new_monitor();
> -	if (!mn)
> -		goto fallback;
> -
> -	if (mnt_monitor_enable_kernel(mn, 1) < 0) {
> -		mnt_unref_monitor(mn);
> -		goto fallback;
> -	}
> -
> -	while (timeout_ms > 0) {
> -		int rc = mnt_monitor_wait(mn, timeout_ms);
> -		if (rc > 0) {
> -			ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
> -			if (ret == 0) {
> -				mnt_unref_monitor(mn);
> -				return 0;
> -			}
> -		} else {
> -			break;
> -		}
> -	}
> -	mnt_unref_monitor(mn);
> -	return ret;
> -
> -fallback:
> +	int ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
>   	for (int retry_count = 0; retry_count < 5 && ret != 0; retry_count++) {
>   		usleep(50000);
>   		ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);


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

end of thread, other threads:[~2026-03-06 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 21:52 [PATCH v2] Revert "nfsrahead: enable event-driven mountinfo monitoring" Steve Dickson
2026-03-06 22:10 ` Steve Dickson

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