#include <lustre/lustre_idl.h>
#include <lustre/liblustreapi.h>
#include <lustre/lustre_user.h>
+#include <lustre_quota.h>
#include <libcfs/libcfsutil.h>
#include "obdctl.h"
}
}
- if (kdestroy)
- system("kdestroy > /dev/null");
+ if (kdestroy) {
+ int rc;
+ if ((rc = system("kdestroy > /dev/null")) != 0) {
+ rc = WEXITSTATUS(rc);
+ fprintf(stderr, "error destroying tickets: %d, continuing\n", rc);
+ }
+ }
if (optind >= argc) {
/* flush for all mounted lustre fs. */
endrec = strtoll(argv[optind++], NULL, 10);
rc = llapi_changelog_start(&changelog_priv,
- follow ? CHANGELOG_FLAG_FOLLOW : 0,
+ CHANGELOG_FLAG_BLOCK |
+ (follow ? CHANGELOG_FLAG_FOLLOW : 0),
mdd, startrec);
if (rc < 0) {
fprintf(stderr, "Can't start changelog: %s\n",
}
while ((rc = llapi_changelog_recv(changelog_priv, &rec)) == 0) {
+ time_t secs;
+ struct tm ts;
+
if (endrec && rec->cr_index > endrec)
break;
if (rec->cr_index < startrec)
continue;
- printf(LPU64" %02d%-5s "LPU64" 0x%x t="DFID,
- rec->cr_index, rec->cr_type,
- changelog_type2str(rec->cr_type), rec->cr_time,
+ secs = rec->cr_time >> 30;
+ gmtime_r(&secs, &ts);
+ printf(LPU64" %02d%-5s %02d:%02d:%02d.%06d %04d.%02d.%02d "
+ "0x%x t="DFID, rec->cr_index, rec->cr_type,
+ changelog_type2str(rec->cr_type),
+ ts.tm_hour, ts.tm_min, ts.tm_sec,
+ (int)(rec->cr_time & ((1<<30) - 1)),
+ ts.tm_year+1900, ts.tm_mon+1, ts.tm_mday,
rec->cr_flags & CLF_FLAGMASK, PFID(&rec->cr_tfid));
if (rec->cr_namelen)
/* namespace rec includes parent and filename */