]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
libnsm.a: Introduce common routines to handle persistent storage
authorChuck Lever <chuck.lever@oracle.com>
Tue, 12 Jan 2010 00:08:10 +0000 (19:08 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 12 Jan 2010 10:50:04 +0000 (05:50 -0500)
rpc.statd and sm-notify access the same set of files under
/var/lib/nfs/statd, but both have their own code base to handle this.
They should share this code.

In addition, the on-disk format used by statd and friends is
considered a formal interface, so this new code will codify the API
and provide documentation for it.

The shared code handles switching from the default parent statd
directory, reducing privileges at start-up, and managing the NSM
state files, in addition to handling normal operations on the
monitored host and notification lists on disk.

The new code is simply a copy of the same logic that was used in
rpc.statd and sm-notify, but wrapped in a nice API.  There should be
minimal behavioral and no on-disk format changes with the new
libnsm.a code.

The new code is more careful to check for bad corner cases.
Occassionally this code may not allow an operation that was permitted
in the past, but hopefully the error reporting has improved enough
that it should be easy to track down any problems.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>

No differences found