From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Bart Van Assche To: "hch@lst.de" , "tj@kernel.org" , "martin.petersen@oracle.com" , "axboe@kernel.dk" CC: "linux-scsi@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-ide@vger.kernel.org" Subject: =?iso-8859-5?Q?Re:_[PATCH_1/7]_=F5d:_split_sd=5Fsetup=5Fdiscard=5Fcmnd?= Date: Mon, 27 Mar 2017 22:24:47 +0000 Message-ID: <1490653474.7897.13.camel@sandisk.com> References: <20170320204319.12628-1-hch@lst.de> <20170320204319.12628-2-hch@lst.de> In-Reply-To: <20170320204319.12628-2-hch@lst.de> Content-Type: text/plain; charset="iso-8859-5" MIME-Version: 1.0 Return-Path: Bart.VanAssche@sandisk.com List-ID: On Mon, 2017-03-20 at 16:43 -0400, Christoph Hellwig wrote: > + u64 sector =3D blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); > + u32 nr_sectors =3D blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); Although I know this is an issue in the existing code and not something introduced by you: please consider using logical_to_sectors() instead of open-coding this function. Otherwise this patch looks fine to me. Thanks, Bart.