Package: zfs-fuse / 0.7.0-12

flush.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/lib/libzpool/flushwc.c b/src/lib/libzpool/flushwc.c
index 344a61f..d625db2 100644
--- a/src/lib/libzpool/flushwc.c
+++ b/src/lib/libzpool/flushwc.c
@@ -130,12 +130,16 @@ static int flushATAwc(int fd) {
  */
 int flushwc(vnode_t *vn) {
   int major_number;
+  int minor_number;
 
   if(!S_ISBLK(vn->v_stat.st_mode))
     // We can only flush the write cache of a block device.
     return ENOTSUP;
 
   major_number = major(vn->v_stat.st_rdev);
+  minor_number = minor(vn->v_stat.st_rdev);
+  if (minor_number % 16 != 0)
+	  return ENOTSUP;
 
   switch(major_number) {
   case SCSI_DISK0_MAJOR: