Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Garrett Cooper
> On Dec 4, 2015, at 12:42, Bruce Evans wrote: ... > I wouldn't trust style(9) for anything except simple formatting, but > look at the subsystem(s) style. Just the top level of geom has 11000+ > lines which can be considered as giving about 20 times more examples > than style(9). It would be

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Bruce Evans
On Fri, 4 Dec 2015, Bryan Drewery wrote: On 12/4/2015 10:03 AM, Bruce Evans wrote: This is specified by not giving an example of using it. style(9) was I really take issue with this stance. I don't think you really mean what this implies. For example, can I even use 'x++' or mtx_lock(9) or u

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Pedro Giffuni
> Il giorno 04/dic/2015, alle ore 13:03, Bruce Evans ha > scritto: > > On Fri, 4 Dec 2015, Andrew Turner wrote: > >> On Fri, 4 Dec 2015 23:42:51 +1100 (EST) >> Bruce Evans wrote: >> ... >>> This looks like 5 style bugs and 0 issues: >>> >>> 3 old style bugs: >>> - use of bool >> >> I don't

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Bryan Drewery
On 12/4/2015 10:03 AM, Bruce Evans wrote: > This is specified by not giving an example of using it. style(9) was I really take issue with this stance. I don't think you really mean what this implies. For example, can I even use 'x++' or mtx_lock(9) or uintptr_t since they are not shown in an exam

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread John Baldwin
On Friday, December 04, 2015 12:53:55 PM Andrew Turner wrote: > On Fri, 4 Dec 2015 23:42:51 +1100 (EST) > Bruce Evans wrote: > ... > > This looks like 5 style bugs and 0 issues: > > > > 3 old style bugs: > > - use of bool > > I don't seem to see where in style(9) we disallow the use of bool. Can

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Conrad Meyer
On Fri, Dec 4, 2015 at 10:03 AM, Bruce Evans wrote: > On Fri, 4 Dec 2015, Andrew Turner wrote: >> I don't seem to see where in style(9) we disallow the use of bool. Can >> you point me where this is specified? > > > This is specified by not giving an example of using it. style(9) was > mostly wri

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Bruce Evans
On Fri, 4 Dec 2015, Andrew Turner wrote: On Fri, 4 Dec 2015 23:42:51 +1100 (EST) Bruce Evans wrote: ... This looks like 5 style bugs and 0 issues: 3 old style bugs: - use of bool I don't seem to see where in style(9) we disallow the use of bool. Can you point me where this is specified? T

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Andrew Turner
On Fri, 4 Dec 2015 23:42:51 +1100 (EST) Bruce Evans wrote: ... > This looks like 5 style bugs and 0 issues: > > 3 old style bugs: > - use of bool I don't seem to see where in style(9) we disallow the use of bool. Can you point me where this is specified? Andrew _

Re: svn commit: r291741 - head/sys/geom

2015-12-04 Thread Bruce Evans
On Thu, 3 Dec 2015, Bryan Drewery wrote: On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: g_disk_limit(struct disk *dp, struct bio *bp) { bool limited = false; - off_t d_maxsize; - - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? - dp->d_delmaxsize : dp->d_maxsize; +

Re: svn commit: r291741 - head/sys/geom

2015-12-03 Thread Kenneth D. Merry
On Thu, Dec 03, 2015 at 19:41:31 -0800, Bryan Drewery wrote: > On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: > > g_disk_limit(struct disk *dp, struct bio *bp) > > { > > bool limited = false; > > - off_t d_maxsize; > > - > > - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? > > - dp->d_del

Re: svn commit: r291741 - head/sys/geom

2015-12-03 Thread Bryan Drewery
On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: > g_disk_limit(struct disk *dp, struct bio *bp) > { > bool limited = false; > - off_t d_maxsize; > - > - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? > - dp->d_delmaxsize : dp->d_maxsize; > + off_t maxsz = g_disk_maxsize(dp, bp)

svn commit: r291741 - head/sys/geom

2015-12-03 Thread Kenneth D. Merry
Author: ken Date: Fri Dec 4 03:38:35 2015 New Revision: 291741 URL: https://svnweb.freebsd.org/changeset/base/291741 Log: Fix g_disk_vlist_limit() to work properly with deletes. Add a new bp argument to g_disk_maxsegs(), and add a new function, g_disk_maxsize() tha will properly determin