I am facing the following problem: btrfs reports write errors for sector 128 on device /dev/sdd:sd 6:0:0:0: [sdd] Invalid command failuresd 6:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSEsd 6:0:0:0: [sdd] Sense Key : Illegal Request [current] sd 6:0:0:0: [sdd] Add. Sense: Invalid field in cdbsd 6:0:0:0: [sdd] CDB: Write(10): 2a 08 00 00 00 80 00 00 08 00end_request: critical target error, dev sdd, sector 128BTRFS: lost page write due to I/O error on /dev/sddBTRFS: bdev /dev/sdd errs: wr 913238, rd 1, flush 150, corrupt 0, gen 0I have run badblocks /dev/sdd and it returned no badblocks. Anyway, I decided to stay on safe side (in a way), created a partition that starts at sector 2048 (default):# fdisk -l /dev/sddDevice     Boot Start       End   Sectors   Size Id Type/dev/sdd1        2048 234441647 234439600 111.8G 83 Linuxand re-added the drive to btrfs volume. Instantly I got the same write error again (note that 2176 = 2048 + 128):sd 13:0:0:0: [sdd] Invalid command failuresd 13:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSEsd 13:0:0:0: [sdd] Sense Key : Illegal Request [current] sd 13:0:0:0: [sdd] Add. Sense: Invalid field in cdbsd 13:0:0:0: [sdd] CDB: Write(10): 2a 08 00 00 08 80 00 00 08 00end_request: critical target error, dev sdd, sector 2176BTRFS: lost page write due to I/O error on /dev/sdd1BTRFS: bdev /dev/sdd1 errs: wr 12253, rd 0, flush 0, corrupt 0, gen 0Could it be that both sectors 128 and 2176 are bad? Well, I have re-run badblocks /dev/sdd (again, it has reported no bad blocks), and pushed the partition further away:# fdisk -l /dev/sddDevice     Boot Start       End   Sectors   Size Id Type/dev/sdd1        4096 234441647 234437552 111.8G 83 Linuxand re-created btrfs volume. Again bad block at the same magic place (4224 = 4096 + 128):sd 6:0:0:0: [sdd] Invalid command failuresd 6:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSEsd 6:0:0:0: [sdd] Sense Key : Illegal Request [current] sd 6:0:0:0: [sdd] Add. Sense: Invalid field in cdbsd 6:0:0:0: [sdd] CDB: Write(10): 2a 08 00 00 10 80 00 00 08 00end_request: critical target error, dev sdd, sector 4224BTRFS: lost page write due to I/O error on /dev/sdd1BTRFS: bdev /dev/sdd1 errs: wr 124433, rd 0, flush 0, corrupt 0, gen 0I don't believe in co-incidences, namely, that no other sector before magic 128 and after 128 are failing, but that specific one is problematic.What is can be? For me sounds like a bug in kernel.Additional info:Linux kernel v3.16.0/dev/sdd is connected via SATA-to-USB adapter JMicron (ID 152d:0567, see how it looks like):dmesg:sd 4:0:0:0: [sdb] Attached SCSI diskscsi 6:0:0:0: Direct-Access     JMicron  Generic          0116 PQ: 0 ANSI: 6sd 6:0:0:0: Attached scsi generic sg5 type 0sd 6:0:0:0: [sdd] 234441648 512-byte logical blocks: (120 GB/111 GiB)sd 6:0:0:0: [sdd] Write Protect is offsd 6:0:0:0: [sdd] Mode Sense: 47 00 10 08sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUAsd 6:0:0:0: [sdd] Attached SCSI disk
Filesystem is reporting a write error on a specific sector even after the partition is moved further
linux;btrfs;badblocks