[Sheepdog] [PATCH v4 3/6] fix a bug of copies calculation in delete_one()

Christoph Hellwig hch at infradead.org
Mon May 7 11:18:41 CEST 2012


On Mon, May 07, 2012 at 04:30:03AM +0900, MORITA Kazutaka wrote:
> If we allow a different level of copies, I think we should limit the
> nr_copies number in get_nr_copies(); get_nr_copies() should be
> min(nr_zones, inode->nr_copies) instead of min(nr_zones, sys->nr_copies).
> So, limiting the nr_copies outside of get_nr_copies() doesn't look
> good to me.
> >
> When we don't know the number of inode->nr_copies (e.g. reading inode
> for the first time), get_nr_copies() should return 1 because calling
> read_object() with larger nr_copies than the actual reduncancy level
> is not safe.

We don't always have the inode available, so at the very least we'd
need to add a variant taking an inode, and one taking the sd_req.




More information about the sheepdog mailing list