summaryrefslogtreecommitdiffstats
path: root/utils/nfsdcld/sqlite.h
Commit message (Collapse)AuthorAgeFilesLines
* nfsdcltrack: rename the nfsdcld directory and options to nfsdcltrackJeff Layton2012-11-111-29/+0
| | | | | | | | | | | | | We'll soon be adding a new nfsdcltrack program, at which point it won't make much sense to call this directory and the config option "nfsdcld". Rename it to be a bit more generic. While we're at it, change the default for --enable-cltrack to "yes". When we introduce the one-shot program, we're going to want to build it by default anyway. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcld: add function to remove unreclaimed client recordsJeff Layton2012-04-261-0/+1
| | | | | | | | | | | | This should remove any client record that has a timestamp prior to the given time. Eventually, this call will need to be made cluster aware when this is run in a clustered configuration. For now, this is only suitable for single-host configurations. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcld: add check/update functionalityJeff Layton2012-04-261-0/+1
| | | | | | | | | Add functions to check whether a client is allowed to reclaim, and update its timestamp in the DB if so. If either the query or update fails, then the host is not allowed to reclaim state. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcld: add remove functionalityJeff Layton2012-04-261-0/+1
| | | | | | | Allow the kernel to ask for removal of a client record. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcld: add routines for a sqlite backend databaseJeff Layton2012-04-261-0/+26
Rather than roll our own "storage engine", use sqlite instead. It fits the bill nicely as it does: - durable on-disk storage - the ability to constrain record uniqueness - a facility for collating and searching the host records ...it does add a build dependency to nfs-utils, but almost all modern distros provide those packages. The current incarnation of this code dynamically links against a provided sqlite library, but we could also consider including their single-file "amalgamation" to reduce dependencies (though with all the caveats that that entails). Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>