All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Mikulas Patocka <mpatocka@redhat.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jens Axboe <axboe@kernel.dk>, Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Zdenek Kabelac <zkabelac@redhat.com>,
	linux-block@vger.kernel.org, dm-devel@lists.linux.dev
Subject: Re: [PATCH] blk-settings: round down io_opt to at least 4K
Date: Mon, 10 Feb 2025 18:02:46 +0100	[thread overview]
Message-ID: <59961cd4-6dd6-45b1-938f-faafa45f568d@gmail.com> (raw)
In-Reply-To: <52b66f23-d8c8-1344-6fd0-277dfa31ce84@redhat.com>

On 2/10/25 1:54 PM, Mikulas Patocka wrote:

...

>> Can you send me the output of:
>>
>> # sg_vpd -p bl /dev/sdN
>>
>> and maybe hdparm -I too? I'd like to see if we can come up with a
>> reasonable heuristic.
>>
>> -- 
>> Martin K. Petersen	Oracle Linux Engineering
> 
> I don't have that USB-SATA bridge that reports optimal I/O size 65535
> sectors. Milan talked about it, but maybe he doesn't have it too. Some
> user reported that cryptsetup behaves badly with this particular bridge,
> so Milan wrote workaround for it in cryptsetup.

I think I have that adapter somewhere in the box (I guess it is JMicron thingy).
But the change in cryptsetup was based on several user reports (one was
https://gitlab.com/cryptsetup/cryptsetup/-/issues/585 but there is too
much confusion from my side :-)

We just added a rule to ignore bogus value and stay with a default
alignment in that case.

There are some links in the report, though:
https://linux-blog.anracom.com/2018/12/03/linux-ssd-partition-alignment-problems-with-external-usb-to-sata-controllers-i/
https://bugzilla.redhat.com/show_bug.cgi?id=1420935

It is an old story, apparently.

If I see it again, I can send report (or even fix) to linux-usb list,
as this is really related to USB storage driver (AFAIK).

The code below just simulated what the USB enclosure presented to kernel.
  
> You can simulate it with "modprobe scsi_debug dev_size_mb=32
> sector_size=512 num_tgts=1 opt_blks=65535"

Milan


  reply	other threads:[~2025-02-10 17:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 15:16 [PATCH] blk-settings: round down io_opt to at least 4K Mikulas Patocka
2025-01-22  6:12 ` Christoph Hellwig
2025-02-03 13:38   ` Mikulas Patocka
2025-02-03 19:02     ` Martin K. Petersen
2025-02-03 21:05       ` Mikulas Patocka
2025-02-04  3:30         ` Martin K. Petersen
2025-02-04  5:57           ` Christoph Hellwig
2025-02-04 13:02             ` Martin K. Petersen
2025-02-04 13:50               ` Christoph Hellwig
2025-02-05  2:36                 ` Martin K. Petersen
2025-02-05 16:00                   ` Christoph Hellwig
2025-02-04 14:56           ` Mikulas Patocka
2025-02-05  2:41             ` Martin K. Petersen
2025-02-10 12:54               ` Mikulas Patocka
2025-02-10 17:02                 ` Milan Broz [this message]
2025-02-04  5:56         ` Christoph Hellwig
2025-02-04  5:55     ` Christoph Hellwig
2025-01-23 12:24 ` Milan Broz

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=59961cd4-6dd6-45b1-938f-faafa45f568d@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@lists.linux.dev \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    --cc=zkabelac@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.