All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Pavel Machek <pavel@ucw.cz>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Benjamin Block <bblock@linux.ibm.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 4/7] Revert "scsi: core: Make scsi_get_lba() return the LBA"
Date: Thu, 11 Jan 2024 10:52:53 +0100	[thread overview]
Message-ID: <20240111094700.436389071@linuxfoundation.org> (raw)
In-Reply-To: <20240111094700.222742213@linuxfoundation.org>

5.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This reverts commit d054858a9c9e4406099e61fe00c93516f9b4c169 which is
commit d2c945f01d233085fedc9e3cf7ec180eaa2b7a85 upstream.

As reported, a lot of scsi changes were made just to resolve a 2 line
patch, so let's revert them all and then manually fix up the 2 line
fixup so that things are simpler and potential abi changes are not an
issue.

Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz
Reported-by: Pavel Machek <pavel@ucw.cz>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Benjamin Block <bblock@linux.ibm.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/scsi/scsi_cmnd.h |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -229,13 +229,6 @@ static inline sector_t scsi_get_sector(s
 	return blk_rq_pos(scmd->request);
 }
 
-static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd)
-{
-	unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT;
-
-	return blk_rq_pos(scmd->request) >> shift;
-}
-
 /*
  * The operations below are hints that tell the controller driver how
  * to handle I/Os with DIF or similar types of protection information.
@@ -298,6 +291,11 @@ static inline unsigned char scsi_get_pro
 	return scmd->prot_type;
 }
 
+static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd)
+{
+	return blk_rq_pos(scmd->request);
+}
+
 static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd)
 {
 	struct request *rq = blk_mq_rq_from_pdu(scmd);



  parent reply	other threads:[~2024-01-11  9:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  9:52 [PATCH 5.10 0/7] 5.10.207-rc1 review Greg Kroah-Hartman
2024-01-11  9:52 ` [PATCH 5.10 1/7] Revert "scsi: core: Always send batch on reset or error handling command" Greg Kroah-Hartman
2024-01-11  9:52 ` [PATCH 5.10 2/7] Revert "scsi: core: Use a structure member to track the SCSI command submitter" Greg Kroah-Hartman
2024-01-11  9:52 ` [PATCH 5.10 3/7] Revert "scsi: core: Use scsi_cmd_to_rq() instead of scsi_cmnd.request" Greg Kroah-Hartman
2024-01-11  9:52 ` Greg Kroah-Hartman [this message]
2024-01-11  9:52 ` [PATCH 5.10 5/7] Revert "scsi: core: Introduce scsi_get_sector()" Greg Kroah-Hartman
2024-01-11  9:52 ` [PATCH 5.10 6/7] Revert "scsi: core: Add scsi_prot_ref_tag() helper" Greg Kroah-Hartman
2024-01-11  9:52 ` [PATCH 5.10 7/7] scsi: core: Always send batch on reset or error handling command Greg Kroah-Hartman
2024-01-11 13:10 ` [PATCH 5.10 0/7] 5.10.207-rc1 review Pavel Machek
2024-01-11 23:24 ` Florian Fainelli
2024-01-12  3:20 ` Slade Watkins
2024-01-12  3:28 ` Dominique Martinet
2024-01-12  4:36 ` Naresh Kamboju
2024-01-12 14:27 ` Jon Hunter

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=20240111094700.436389071@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=bblock@linux.ibm.com \
    --cc=bvanassche@acm.org \
    --cc=martin.petersen@oracle.com \
    --cc=patches@lists.linux.dev \
    --cc=pavel@ucw.cz \
    --cc=sashal@kernel.org \
    --cc=stable@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 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.