From: Christoph Hellwig <hch@infradead.org>
To: Mike Christie <michael.christie@oracle.com>
Cc: hch@infradead.org, martin.petersen@oracle.com,
james.bottomley@hansenpartnership.com,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH 4/5] scsi: target: Add file configure_unmap callout
Date: Mon, 27 Jun 2022 22:04:47 -0700 [thread overview]
Message-ID: <YrqL77/5rcB/Xzi6@infradead.org> (raw)
In-Reply-To: <20220628022953.20948-5-michael.christie@oracle.com>
On Mon, Jun 27, 2022 at 09:29:52PM -0500, Mike Christie wrote:
> +static bool fd_configure_unmap(struct se_device *dev)
> +{
> + struct file *file = FD_DEV(dev)->fd_file;
> + struct inode *inode = file->f_mapping->host;
> +
> + if (S_ISBLK(inode->i_mode)) {
> + return target_configure_unmap_from_queue(&dev->dev_attrib,
> + I_BDEV(inode));
> + } else {
No need for the else here.
Otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2022-06-28 5:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 2:29 [PATCH 0/5] target: UNMAP/WRITE_SAME features/cleanups for 5.20 Mike Christie
2022-06-28 2:29 ` [PATCH 1/5] scsi: target: Remove incorrect zero blocks WRITE_SAME check Mike Christie
2022-06-28 5:03 ` Christoph Hellwig
2022-06-28 2:29 ` [PATCH 2/5] scsi: target: Add callout to configure unmap settings Mike Christie
2022-06-28 5:03 ` Christoph Hellwig
2022-06-28 2:29 ` [PATCH 3/5] scsi: target: Add iblock configure_unmap callout Mike Christie
2022-06-28 5:03 ` Christoph Hellwig
2022-06-28 2:29 ` [PATCH 4/5] scsi: target: Add file " Mike Christie
2022-06-28 5:04 ` Christoph Hellwig [this message]
2022-06-28 2:29 ` [PATCH 5/5] scsi: target: Detect unmap support post configuration Mike Christie
2022-06-28 5:06 ` Christoph Hellwig
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=YrqL77/5rcB/Xzi6@infradead.org \
--to=hch@infradead.org \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@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