#define OBD_IOC_START_LFSCK _IOWR('f', 230, OBD_IOC_DATA_TYPE)
#define OBD_IOC_STOP_LFSCK _IOW('f', 231, OBD_IOC_DATA_TYPE)
#define OBD_IOC_QUERY_LFSCK _IOR('f', 232, struct obd_ioctl_data)
-#define OBD_IOC_CHLG_POLL _IOR('f', 233, long)
+#define OBD_IOC_CHLG_SET_FLAGS _IOR('f', 233, long)
+/* for compatibility issues with old apps */
+#define OBD_IOC_CHLG_POLL OBD_IOC_CHLG_SET_FLAGS
/* lustre/lustre_user.h 240-253 */
#endif /* _UAPI_LUSTRE_IOCTL_H */
struct list_head crs_rec_queue;
unsigned int crs_last_catidx;
unsigned int crs_last_idx;
- bool crs_poll;
+ unsigned int crs_flags;
};
struct chlg_rec_entry {
CERROR("%s: fail to process llog: rc = %d\n", obd->obd_name, rc);
GOTO(err_out, rc);
}
- if (!kthread_should_stop() && crs->crs_poll) {
+ if (!kthread_should_stop() &&
+ (crs->crs_flags & CHANGELOG_FLAG_FOLLOW)) {
llog_cat_close(NULL, llh);
llog_ctxt_put(ctx);
class_decref(obd, "changelog", crs);
return mask;
}
-static long chlg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static long chlg_ioctl(struct file *file, unsigned int cmd, unsigned long flags)
{
int rc;
struct chlg_reader_state *crs = file->private_data;
switch (cmd) {
case OBD_IOC_CHLG_POLL:
- crs->crs_poll = !!arg;
+ crs->crs_flags = flags;
rc = 0;
break;
default:
if (flags & CHANGELOG_FLAG_FOLLOW) {
int rc;
- rc = ioctl(cp->clp_fd, OBD_IOC_CHLG_POLL, 1);
+
+ rc = ioctl(cp->clp_fd, OBD_IOC_CHLG_SET_FLAGS,
+ CHANGELOG_FLAG_FOLLOW);
if (rc < 0)
llapi_err_noerrno(LLAPI_MSG_ERROR, "can't enable "
"CHANGELOG_FLAG_FOLLOW");