Skip to contentSkip to conversation

rpc.idmapd: Ignore open failures in dirscancb()

PATCH In review Steve Dickson 1 participant 2 messages Jan 2, 2013 – Jan 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpc.idmapd: Ignore open failures in dirscancb()

From: David Jeffery <[email protected]>

The daemon "rpc.idmapd" scans the /var/lib/nfs/rpc_pipefs/nfs/ directory periodically looking for NFS client mounts to communicate to. The daemon tried to open communication with a client mount but it disappeared in between looking for directory entries and opening them. NFS mount was umounted just before rpc.idmapd tried to communicate with it. This behavior is usually seen when autofs is configured on the system.

---
 utils/idmapd/idmapd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
utils/idmapd/idmapd.c +2 -1
index 9d66225..beba9c4 100644
@@ -424,7 +424,8 @@ dirscancb(int UNUSED(fd), short UNUSED(which), void *data)
 			    pipefsdir, ents[i]->d_name);
 
 			if ((ic->ic_dirfd = open(path, O_RDONLY, 0)) == -1) {
-				xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
+				if (verbose > 0)
+					xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
 				free(ic);
 				goto out;
 			}
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 10 lines · Steve Dickson

From: David Jeffery <[email protected]>

The daemon "rpc.idmapd" scans the /var/lib/nfs/rpc_pipefs/nfs/ directory periodically looking for NFS client mounts to communicate to. The daemon tried to open communication with a client mount but it disappeared in between looking for directory entries and opening them. NFS mount was umounted just before rpc.idmapd tried to communicate with it. This behavior is usually seen when autofs is configured on the system.

Committed...

steved.

Quoted 19 lines
---
 utils/idmapd/idmapd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
utils/idmapd/idmapd.c +2 -1
index 9d66225..beba9c4 100644
@@ -424,7 +424,8 @@ dirscancb(int UNUSED(fd), short UNUSED(which), void *data)
 			    pipefsdir, ents[i]->d_name);
 
 			if ((ic->ic_dirfd = open(path, O_RDONLY, 0)) == -1) {
-				xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
+				if (verbose > 0)
+					xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
 				free(ic);
 				goto out;
 			}