Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: dhowells@redhat.com, linux-scsi@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: SCSI error indicating misalignment on part of Linux scsi or block layer?
Date: Tue, 16 Jul 2024 20:55:41 +0100	[thread overview]
Message-ID: <483247.1721159741@warthog.procyon.org.uk> (raw)

Hi James,

I'm wondering if I'm seeing a problem with DIO writes through Ext4 or XFS
manifesting as SCSI misalignment errors.  This has occurred with two different
drives.  I saw it first with v6.10-rc6, I think, but I haven't tried
cachefiles for a while.  It does happen with v6.10.

ata1.00: exception Emask 0x60 SAct 0x1 SErr 0x800 action 0x6 frozen
ata1.00: irq_stat 0x20000000, host bus error
ata1: SError: { HostInt }
ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/68:00:b0:93:34/00:00:02:00:00/40 tag 0 ncq dma 53248 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x60 (host bus error)
ata1.00: status: { DRDY }
ata1: hard resetting link
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/133
sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=3s
sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] 
sd 0:0:0:0: [sda] tag#0 Add. Sense: Unaligned write command
sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 02 34 93 b0 00 00 68 00
I/O error, dev sda, sector 37000112 op 0x1:(WRITE) flags 0x8800 phys_seg 1 prio class 0
ata1: EH complete

For reference, I made it dump the result of the READ CAPACITY 16 command:

sd 0:0:0:0: [sda] RC16 000000003a38602f000002000000000000000000000000000000000000000000

The drive says it has 512-byte logical and physical block sizes.

The DIO writes are being generated by cachefiles and are all
PAGE_SIZED-aligned in terms of file offset and request length.

I also saw this:

	CacheFiles: I/O Error: Trunc-to-dio-size failed -95 [o=000001cb]

which indicates that ext4/xfs returned EOPNOTSUPP to vfs_truncate() and thence
to cachefiles.  I'm not sure why it would do that.

Any idea what might cause this or how to investigate it further?  Is it
possible it's some sort of hardware error in the I/O bridge or IOMMU?

Thanks,
David


             reply	other threads:[~2024-07-16 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 19:55 David Howells [this message]
2024-07-16 23:07 ` SCSI error indicating misalignment on part of Linux scsi or block layer? Damien Le Moal
2024-07-17  0:01   ` David Howells
2024-07-17  0:31     ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483247.1721159741@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox