linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: michael.christie@oracle.com
To: John Garry <john.g.garry@oracle.com>,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org
Subject: Re: [PATCH 2/7] scsi: target: Add atomic se_device fields
Date: Wed, 23 Jul 2025 14:38:21 -0500	[thread overview]
Message-ID: <bcd7df02-df10-4dc4-a930-ba8c5bf0a02a@oracle.com> (raw)
In-Reply-To: <f78e4c94-ddc4-48dd-8d4b-182566e9234e@oracle.com>

On 7/23/25 11:21 AM, John Garry wrote:
> On 23/07/2025 16:48, michael.christie@oracle.com wrote:
>>>>> What if you are not using a physical block device like using LIO's
>>>>> ramdisk mode
>>>>> to perform testing?
>>>> But would this non-physical device still need to support atomics? I
>>>> would assume so.
>>> It depends. For just a testing mode not necessarily. It can be relaxed
>>> so you can test different scenarios like you want to test when atomics
>>> are not supported correctly. For real support yes.
>>>
>>> But just to be clear for either case, there won't always be a
>>> request_queue/block_device. For example, rd and tcmu don't use
>>> target_configure_write_atomic_from_bdev, so the atomic values can be
>>> whatever they want to support.
> 
> If that is acceptable, then I am curious why only make alignment
> configurable (and not the other params)? From below, it seems that you
> have some special device to support.
> 

Oh I completely misunderstood you :) I see what you were asking. I think
it was just a mistake.

>> I think I misunderstood the last comment.
>>
>> I'm trying to make sure I can support a broken device for testing so I
>> tried to make as flexible as possible.
>>
>> With the code as is though I think your concern in the last comment is
>> that a user could set some valid settings, use rd/tcmu, and think they
>> were safe when they are not. If so, then I agree that can happen.
>>
>> Or are you saying even for broken device simulation that we will never
>> need to set values like alignment above?
> 
> I suppose that we can set alignment for broken devices, yes.
> 
> I'll make a couple of points about scsi alignment as it is a bit
> special. Firstly the alignment should be compatible with the atomic
> write unit min. atomic write unit min comes from the granularity/pbs. So
> the granularity/pbs needs to be compatible with alignment.
> 
> A further point is that if a partition is not aligned on the atomic
> write unit min boundary, then atomic writes are disabled for that bdev
> partition.

I didn't completely understand these 2 paragraphs. Are you saying you
want me to enforce this type of thing somewhere. How does the info above
come into play if we are testing against other OSs for example?

  reply	other threads:[~2025-07-23 19:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08  2:03 [PATCH 0/7] scsi: target: Add WRITE_ATOMIC_16 support Mike Christie
2024-10-08  2:03 ` [PATCH 1/7] scsi: target: Rename target_configure_unmap_from_queue Mike Christie
2025-05-14 11:11   ` John Garry
2024-10-08  2:03 ` [PATCH 2/7] scsi: target: Add atomic se_device fields Mike Christie
2025-05-14 10:26   ` John Garry
2025-07-20 22:15     ` Mike Christie
2025-07-23 11:28       ` John Garry
2025-07-23 15:10         ` michael.christie
2025-07-23 15:48           ` michael.christie
2025-07-23 16:21             ` John Garry
2025-07-23 19:38               ` michael.christie [this message]
2024-10-08  2:03 ` [PATCH 3/7] scsi: target: Add helper to setup atomic values from block_device Mike Christie
2025-05-14 10:29   ` John Garry
2024-10-08  2:03 ` [PATCH 4/7] scsi: target: Add WRITE_ATOMIC_16 handler Mike Christie
2024-10-09  6:10   ` kernel test robot
2025-05-14 10:47   ` John Garry
2025-07-20 22:44     ` Mike Christie
2024-10-08  2:03 ` [PATCH 5/7] scsi: target: Report atomic values in INQUIRY Mike Christie
2025-05-14 10:56   ` John Garry
2025-07-20 22:42     ` Mike Christie
2024-10-08  2:03 ` [PATCH 6/7] scsi: target: Add WRITE_ATOMIC_16 support to RSOC Mike Christie
2024-10-08  2:03 ` [PATCH 7/7] scsi: target: Add atomic support to target_core_iblock Mike Christie
2025-05-14 11:01   ` John Garry

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=bcd7df02-df10-4dc4-a930-ba8c5bf0a02a@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@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;
as well as URLs for NNTP newsgroup(s).