Thread (27 messages) read the whole thread 27 messages, 6 authors, 2017-01-04

Re: [PATCH 4/4] xfs: don't rely on ->total in xfs_alloc_space_available

From: Christoph Hellwig <hch@lst.de>
Date: 2016-12-15 08:56:35

On Wed, Dec 14, 2016 at 04:51:58PM -0500, Brian Foster wrote:
On Wed, Dec 14, 2016 at 08:38:02PM +0100, Christoph Hellwig wrote:
quoted
On Wed, Dec 14, 2016 at 01:30:18PM -0500, Brian Foster wrote:
quoted
quoted
 	/* do we have enough contiguous free space for the allocation? */
+	alloc_len = args->minlen + (args->alignment - 1)+ args->minalignslop;
Whitespace nit, missing space:				^

Also, is the addition of braces intentional? I believe it is possible
for args->alignment == 0.
It's mostly for explaining the - 1 to the reader as it took me a while
to figure out what it was for.
Oh, care to elaborate? :)
the alignment is the boundary we want to align to, so we'll have to add
alignment - 1 at max to achive it. 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help