+ int fd;
+
+ fd = open(dev, O_RDONLY);
+ if (fd < 0)
+ return 1;
+
+ if (ioctl(fd, BLKSSZGET, bs) < 0) {
+ close(fd);
+ return 1;
+ }
+
+ close(fd);
+ return 0;
+}
+
+static int trace_add_file(struct thread_data *td, __u32 device,
+ unsigned int *bs)
+{
+ static unsigned int last_maj, last_min, last_fileno, last_bs;