X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Frmtab.c;fp=utils%2Fmountd%2Frmtab.c;h=90fbef4702eede421b96e0e46ebe35aaf3c8037c;hp=844de511f48b07d76baac5b0b828b9e5520af33f;hb=af93e0306d87bba3f703386fd6390e9bf8e76816;hpb=2c91715a9c8dbf18df1666f70e78d6e36e123ca0 diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c index 844de51..90fbef4 100644 --- a/utils/mountd/rmtab.c +++ b/utils/mountd/rmtab.c @@ -19,6 +19,7 @@ #include "exportfs.h" #include "xio.h" #include "mountd.h" +#include "ha-callout.h" #include /* PATH_MAX */ @@ -61,6 +62,8 @@ mountlist_add(char *host, const char *path) host) == 0 && strcmp(rep->r_path, path) == 0) { rep->r_count++; + /* PRC: do the HA callout: */ + ha_callout("mount", rep->r_client, rep->r_path, rep->r_count); putrmtabent(rep, &pos); endrmtabent(); xfunlock(lockid); @@ -75,6 +78,8 @@ mountlist_add(char *host, const char *path) xe.r_path [sizeof (xe.r_path) - 1] = '\0'; xe.r_count = 1; if (setrmtabent("a")) { + /* PRC: do the HA callout: */ + ha_callout("mount", xe.r_client, xe.r_path, xe.r_count); putrmtabent(&xe, NULL); endrmtabent(); } @@ -103,8 +108,11 @@ mountlist_del(char *hname, const char *path) while ((rep = getrmtabent(1, NULL)) != NULL) { match = !strcmp (rep->r_client, hname) && !strcmp(rep->r_path, path); - if (match) + if (match) { rep->r_count--; + /* PRC: do the HA callout: */ + ha_callout("unmount", rep->r_client, rep->r_path, rep->r_count); + } if (!match || rep->r_count) fputrmtabent(fp, rep, NULL); }