Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-08 Thread Martin K. Petersen
> "Long" == Long Li writes: Long, Long> The problem I'm trying to solve is that, I want to have lower Long> layer driver to setup max_sectors bigger than Long> BLK_DEF_MAX_SECTORS. Capping at BLK_DEF_MAX_SECTORS unless a device has explicitly reported requirements is

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-08 Thread Martin K. Petersen
> "Long" == Long Li writes: Long, Long> The problem I'm trying to solve is that, I want to have lower Long> layer driver to setup max_sectors bigger than Long> BLK_DEF_MAX_SECTORS. Capping at BLK_DEF_MAX_SECTORS unless a device has explicitly reported requirements is intentional. We have

RE: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-07 Thread Long Li
une 6, 2016 8:42 PM > To: Long Li <lon...@microsoft.com> > Cc: Tom Yan <tom.t...@gmail.com>; James E.J. Bottomley > <j...@linux.vnet.ibm.com>; Martin K. Petersen > <martin.peter...@oracle.com>; linux-s...@vger.kernel.org; linux- > ker...@vger.ke

RE: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-07 Thread Long Li
une 6, 2016 8:42 PM > To: Long Li > Cc: Tom Yan ; James E.J. Bottomley > ; Martin K. Petersen > ; linux-s...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] sd: remove redundant check for > BLK_DEF_MAX_SECTORS > > >>>>> "Long" ==

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-06 Thread Martin K. Petersen
> "Long" == Long Li writes: Long, Long> The reason is that, max_sectors already has value at this point, Long> the default value is SCSI_DEFAULT_MAX_SECTORS Long> (include/scsi/scsi_host.h). The lower layer host driver can change Long> this value in its template. The

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-06 Thread Martin K. Petersen
> "Long" == Long Li writes: Long, Long> The reason is that, max_sectors already has value at this point, Long> the default value is SCSI_DEFAULT_MAX_SECTORS Long> (include/scsi/scsi_host.h). The lower layer host driver can change Long> this value in its template. The LLD sets

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Tom Yan
.J. Bottomley <j...@linux.vnet.ibm.com>; Martin K. Petersen >> <martin.peter...@oracle.com>; linux-s...@vger.kernel.org; linux- >> ker...@vger.kernel.org >> Subject: Re: [PATCH] sd: remove redundant check for >> BLK_DEF_MAX_SECTORS >> >> The main point

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Tom Yan
y can use BLOCK LIMITS VPD to > tell it to do so. > > >> -Original Message- >> From: Tom Yan [mailto:tom.t...@gmail.com] >> Sent: Saturday, June 4, 2016 1:41 AM >> To: Long Li >> Cc: James E.J. Bottomley ; Martin K. Petersen >> ; linux-s...@vger.k

RE: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Long Li
tomley <j...@linux.vnet.ibm.com>; Martin K. Petersen > <martin.peter...@oracle.com>; linux-s...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] sd: remove redundant check for > BLK_DEF_MAX_SECTORS > > The main point there is not to check

RE: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Long Li
; linux-s...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] sd: remove redundant check for > BLK_DEF_MAX_SECTORS > > The main point there is not to check q->limits.max_sectors against > BLK_DEF_MAX_SECTORS, but sdkp->opt_xfer_blocks against > S

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Tom Yan
The main point there is not to check q->limits.max_sectors against BLK_DEF_MAX_SECTORS, but sdkp->opt_xfer_blocks against SD_DEF_XFER_BLOCKS et al.? `rw_max = BLK_DEF_MAX_SECTORS;` there is merely the fallback when sdkp->opt_xfer_blocks does not pass the conditions. With your patch `rw_max` can be

Re: [PATCH] sd: remove redundant check for BLK_DEF_MAX_SECTORS

2016-06-04 Thread Tom Yan
The main point there is not to check q->limits.max_sectors against BLK_DEF_MAX_SECTORS, but sdkp->opt_xfer_blocks against SD_DEF_XFER_BLOCKS et al.? `rw_max = BLK_DEF_MAX_SECTORS;` there is merely the fallback when sdkp->opt_xfer_blocks does not pass the conditions. With your patch `rw_max` can be