iolog: use a define instead of a raw bit mask

Add a comment too, while in there.

Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/iolog.c b/iolog.c
index c3b42b3..8bfd5bc 100644
--- a/iolog.c
+++ b/iolog.c
@@ -565,7 +565,7 @@
 	l->td = p->td;
 
 	if (l->log_offset)
-		l->log_ddir_mask = 0x80000000;
+		l->log_ddir_mask = LOG_OFFSET_SAMPLE_BIT;
 
 	INIT_FLIST_HEAD(&l->chunk_list);
 
@@ -622,10 +622,7 @@
 		return;
 
 	s = __get_sample(samples, 0, 0);
-	if (s->__ddir & 0x80000000)
-		log_offset = 1;
-	else
-		log_offset = 0;
+	log_offset = (s->__ddir & LOG_OFFSET_SAMPLE_BIT) != 0;
 
 	nr_samples = sample_size / __log_entry_sz(log_offset);
 
diff --git a/iolog.h b/iolog.h
index d268fe2..fcd6794 100644
--- a/iolog.h
+++ b/iolog.h
@@ -93,7 +93,11 @@
 	struct flist_head chunk_list;
 };
 
-#define io_sample_ddir(io)	((io)->__ddir & ~0x80000000U)
+/*
+ * If the upper bit is set, then we have the offset as well
+ */
+#define LOG_OFFSET_SAMPLE_BIT	0x80000000U
+#define io_sample_ddir(io)	((io)->__ddir & ~LOG_OFFSET_SAMPLE_BIT)
 
 static inline void io_sample_set_ddir(struct io_log *log,
 				      struct io_sample *io,