* [PATCH] Revert "nfsrahead: enable event-driven mountinfo monitoring and skip non-NFS devices"
@ 2026-03-10 12:36 Steve Dickson
2026-03-10 13:28 ` Aaron Tomlin
0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2026-03-10 12:36 UTC (permalink / raw)
To: Linux NFS Mailing list
Process 869 (nfsrahead) of user 0 dumped core.
Module /usr/libexec/nfsrahead from rpm nfs-utils-2.8.6-0.fc43.x86_64
Module libpcre2-8.so.0 from rpm pcre2-10.47-1.fc43.x86_64
Module libselinux.so.1 from rpm libselinux-3.9-5.fc43.x86_64
Module libblkid.so.1 from rpm util-linux-2.41.3-7.fc43.x86_64
Module libmount.so.1 from rpm util-linux-2.41.3-7.fc43.x86_64
Stack trace of thread 869:
#0 0x00007f1a867653cc __pthread_kill_implementation (libc.so.6 + 0x743cc)
#1 0x00007f1a8670b15e raise (libc.so.6 + 0x1a15e)
#2 0x00007f1a866f26d0 abort (libc.so.6 + 0x16d0)
#3 0x00007f1a866f373b __libc_message_impl.cold (libc.so.6 + 0x273b)
#4 0x00007f1a8676f665 malloc_printerr (libc.so.6 + 0x7e665)
#5 0x00007f1a8676f684 malloc_printerr_tail (libc.so.6 + 0x7e684)
#6 0x00005624543b1d32 main (/usr/libexec/nfsrahead + 0xd32)
#7 0x00007f1a866f45b5 __libc_start_call_main (libc.so.6 + 0x35b5)
#8 0x00007f1a866f4668 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x3668)
#9 0x00005624543b1fb5 _start (/usr/libexec/nfsrahead + 0xfb5)
ELF object binary architecture: AMD x86-64
https://bodhi.fedoraproject.org/updates/FEDORA-2026-e033b6bafe
This reverts commit 0f5fe65d83f7455112aea82bf96f99523cb03ca7.
---
tools/nfsrahead/main.c | 55 +-----------------------------------------
1 file changed, 1 insertion(+), 54 deletions(-)
diff --git a/tools/nfsrahead/main.c b/tools/nfsrahead/main.c
index 78cd2581..b7b889ff 100644
--- a/tools/nfsrahead/main.c
+++ b/tools/nfsrahead/main.c
@@ -3,7 +3,6 @@
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
-#include <time.h>
#include <libmount/libmount.h>
#include <sys/sysmacros.h>
@@ -18,8 +17,6 @@
#define CONF_NAME "nfsrahead"
#define NFS_DEFAULT_READAHEAD 128
-#define MNT_NM_TIMEOUT 10000
-
/* Device information from the system */
struct device_info {
char *device_number;
@@ -120,57 +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;
- struct timespec start, now;
- int remaining_ms = MNT_NM_TIMEOUT;
-
- /*
- * Fast-path rejection:
- * NFS backing devices always use the anonymous block device major number (0).
- * If the device number does not start with "0:", it is a physical block device
- * and will never be an NFS mount. Exit immediately to prevent blocking udev.
- */
- if (strncmp(device_number, "0:", 2) != 0)
- return -ENODEV;
-
- 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;
- }
-
- clock_gettime(CLOCK_MONOTONIC, &start);
-
- while (remaining_ms > 0) {
- int rc = mnt_monitor_wait(mn, remaining_ms);
- if (rc > 0) {
- ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
- if (ret == 0) {
- mnt_unref_monitor(mn);
- return 0;
- }
- } else {
- break;
- }
-
- clock_gettime(CLOCK_MONOTONIC, &now);
- long elapsed_ms = (now.tv_sec - start.tv_sec) * 1000 +
- (now.tv_nsec - start.tv_nsec) / 1000000;
- remaining_ms = MNT_NM_TIMEOUT - elapsed_ms;
- }
-
- 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] 3+ messages in thread
* Re: [PATCH] Revert "nfsrahead: enable event-driven mountinfo monitoring and skip non-NFS devices"
2026-03-10 12:36 [PATCH] Revert "nfsrahead: enable event-driven mountinfo monitoring and skip non-NFS devices" Steve Dickson
@ 2026-03-10 13:28 ` Aaron Tomlin
2026-03-10 15:53 ` Steve Dickson
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Tomlin @ 2026-03-10 13:28 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing list
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Tue, Mar 10, 2026 at 08:36:23AM -0400, Steve Dickson wrote:
> #1 0x00007f1a8670b15e raise (libc.so.6 + 0x1a15e)
> #2 0x00007f1a866f26d0 abort (libc.so.6 + 0x16d0)
> #3 0x00007f1a866f373b __libc_message_impl.cold (libc.so.6 + 0x273b)
> #4 0x00007f1a8676f665 malloc_printerr (libc.so.6 + 0x7e665)
> #5 0x00007f1a8676f684 malloc_printerr_tail (libc.so.6 + 0x7e684)
> #6 0x00005624543b1d32 main (/usr/libexec/nfsrahead + 0xd32)
> #7 0x00007f1a866f45b5 __libc_start_call_main (libc.so.6 + 0x35b5)
> #8 0x00007f1a866f4668 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x3668)
> #9 0x00005624543b1fb5 _start (/usr/libexec/nfsrahead + 0xfb5)
> ELF object binary architecture: AMD x86-64
Hi Steve,
> https://bodhi.fedoraproject.org/updates/FEDORA-2026-e033b6bafe
>
> This reverts commit 0f5fe65d83f7455112aea82bf96f99523cb03ca7.
> ---
I thought this was resolved with [PATCH 1/2] nfsrahead: zero-initialise device_info struct [1], no?
[1]: https://lore.kernel.org/linux-nfs/20260309145025.107623-1-atomlin@atomlin.com/T/#t
Please note that series [2] is based on this particular patch.
[2]: https://lore.kernel.org/linux-nfs/20260309145025.107623-1-atomlin@atomlin.com/T/#m1309a5bf24457934f3d2db7ca5706e240aae51d1
Kind regards,
--
Aaron Tomlin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "nfsrahead: enable event-driven mountinfo monitoring and skip non-NFS devices"
2026-03-10 13:28 ` Aaron Tomlin
@ 2026-03-10 15:53 ` Steve Dickson
0 siblings, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2026-03-10 15:53 UTC (permalink / raw)
To: Aaron Tomlin; +Cc: Linux NFS Mailing list
On 3/10/26 9:28 AM, Aaron Tomlin wrote:
> On Tue, Mar 10, 2026 at 08:36:23AM -0400, Steve Dickson wrote:
>> #1 0x00007f1a8670b15e raise (libc.so.6 + 0x1a15e)
>> #2 0x00007f1a866f26d0 abort (libc.so.6 + 0x16d0)
>> #3 0x00007f1a866f373b __libc_message_impl.cold (libc.so.6 + 0x273b)
>> #4 0x00007f1a8676f665 malloc_printerr (libc.so.6 + 0x7e665)
>> #5 0x00007f1a8676f684 malloc_printerr_tail (libc.so.6 + 0x7e684)
>> #6 0x00005624543b1d32 main (/usr/libexec/nfsrahead + 0xd32)
>> #7 0x00007f1a866f45b5 __libc_start_call_main (libc.so.6 + 0x35b5)
>> #8 0x00007f1a866f4668 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x3668)
>> #9 0x00005624543b1fb5 _start (/usr/libexec/nfsrahead + 0xfb5)
>> ELF object binary architecture: AMD x86-64
>
> Hi Steve,
>
>> https://bodhi.fedoraproject.org/updates/FEDORA-2026-e033b6bafe
>>
>> This reverts commit 0f5fe65d83f7455112aea82bf96f99523cb03ca7.
>> ---
>
> I thought this was resolved with [PATCH 1/2] nfsrahead: zero-initialise device_info struct [1], no?
>
> [1]: https://lore.kernel.org/linux-nfs/20260309145025.107623-1-atomlin@atomlin.com/T/#t
>
> Please note that series [2] is based on this particular patch.
>
>
> [2]: https://lore.kernel.org/linux-nfs/20260309145025.107623-1-atomlin@atomlin.com/T/#m1309a5bf24457934f3d2db7ca5706e240aae51d1
>
>
> Kind regards,
Okay... v2 does apply so I'll go with those....
steved.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-10 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 12:36 [PATCH] Revert "nfsrahead: enable event-driven mountinfo monitoring and skip non-NFS devices" Steve Dickson
2026-03-10 13:28 ` Aaron Tomlin
2026-03-10 15:53 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox