Re: [PATCH 1/1] rpc.statd: fix the failure of SM_DIR creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 8, 2009, at Jan 8, 2009, 8:44 AM, wengang wang wrote:
Please let me if here is not the place talking about rpc.statd.

this's going to talk about rpc.statd.
in case SM_DIR doesn't exist, it may not be created.
according code in shuffle_dirs(), since st is not initailized, whether
the SM_DIR is created depends on the thread stack of rpc.statd.
the fix is to insert a memset() before calling stat().

#the patch is against nfs-utils 1.0.9

There is no utils/statd/state.c in the current nfs-utils repo (1.1.4 +). That code was replaced a year or two ago with a new split sm- notify / rpc.statd implementation from SuSE.

Can you take a look at the latest nfs-utils source code and see if the problem you encountered is in the new code base? We have been discussing some changes in that area already, as the sm-notify code does a rename(2) in the state directory and then a sync(2) during system boot, and that causes a slow-down during system start-up. The creation of that directory and those files was a key discussion point.

Signed-off-by: Wengang Wang <wen.gang.wang@xxxxxxxxxx>
--
state.c |    2 ++
1 file changed, 2 insertions(+)
diff -up ./utils/statd/state.c.orig ./utils/statd/state.c
--- ./utils/statd/state.c.orig	2009-01-08 20:32:44.000000000 +0800
+++ ./utils/statd/state.c	2009-01-08 20:33:07.000000000 +0800
@@ -89,6 +89,8 @@ shuffle_dirs (void)
  char *src, *dst;
  int len1, len2, len;

+  memset (&st, 0, sizeof st);
+
  if (stat (SM_DIR, &st) == -1 && errno != ENOENT)
    die ("stat (%s): %s", SM_DIR, strerror (errno));

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com




--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux