Re: [PATCH 5/6] pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +static void
> > +bl_free_device(struct pnfs_block_dev *dev)
> > +{
> > +	if (dev->nr_children) {
> > +		int i;
> > +
> > +		for (i = 0; i < dev->nr_children; i++)
> > +			bl_free_device(&dev->children[i]);
> > +		kfree(dev->children);
> > +	} else {
> > +		if (dev->bdev)
> > +			blkdev_put(dev->bdev, FMODE_READ);
> 
> else if (dev->bdev)? :)

This was ver ymuch intentional to make it clear there's a leaf device and
non-leaf device case.

> Can you make each of these cases a helper function?

I could - in fact I had it that way earlier, but it increased code size and
decreased readability so I merged it back together.

> > +static int
> > +bl_parse_deviceid(struct nfs_server *server, struct pnfs_block_dev *d,
> > +		struct pnfs_block_volume *volumes, int idx, gfp_t gfp_mask);
> 
> Why put the declaration in the middle of the file?

No good reason - this is about where we start to need it.  I can move
it to the top.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux