Revert "nfsrahead: enable event-driven mountinfo monitoring"
Subsystems (2)
PATCH 1/1 Revert "nfsrahead: enable event-driven mountinfo monitoring"
This reverts commit 2b62ac4c273a647df07400dc1126fceb76ad96c0.
--- tools/nfsrahead/main.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-)
tools/nfsrahead/main.c +1 -34
@@ -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 );
Signature · 1 line
2.53.0
Quoted 1 line · Steve Dickson
This reverts commit
2b62ac4c273a647df07400dc1126fceb76ad96c0.
Why?
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Steve Dickson
This reverts commit
2b62ac4c273a647df07400dc1126fceb76ad96c0.Why?
steved.
Quoted 10 lines · Steve Dickson
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Steve Dickson
This reverts commit
2b62ac4c273a647df07400dc1126fceb76ad96c0.Why?
Please put the reason into the commit log.
Quoted 5 lines · Christoph Hellwig
Quoted 4 lines · Steve Dickson
Quoted 1 line · Christoph Hellwig
On Thu, Mar 05, 2026 at 07:42:21AM -0500, Steve Dickson wrote:
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
This reverts commit
2b62ac4c273a647df07400dc1126fceb76ad96c0.Why?
Please put the reason into the commit log.
Fair enough...
steved.