Re: [PATCH 2/2] bcache: fix calling ida_simple_remove() withincorrect minor

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

 



On 2017/5/8 下午12:48, tang.junhui@xxxxxxxxxx wrote:
> Hello Coly,
> 
> 
> > Hi Junhui,
> 
> > 
> 
> > I think this is a design on purpose. Current multiple partitions bcache
> 
> > design is per-device, not per major number, and each bcache devices as
> 
> > 16 partitions at max.
> 
> > 
> 
> > This is why when you see a bcache device is initialized, the first minor
> 
> > of the device will *BCACHE_MINORS.
> 
> > 
> 
> > Your patch won't make all minor numbers of the partitions of a bcache
> 
> > device being continuous, IMHO this is not correct.
> 
> > 
> 
> > Thanks.
> 
> > 
> 
> > Coly
> 
> 
> We get minor number by ida_simple_get(), but the minor what we are going to
> 
> relase is minor*BCACHE_MINORS, so we release a wrong minor
> minor*BCACHE_MINORS, 
> 
> and the right minor number leakage occures.

I mean if there are partitions on bcache devices, like
/dev/bcache0p1, /dev/bcache0p2 ... /dev/bcache0p16
/dev/bcache1p1, /dev/bcache1p2 ... /dev/bcache0p16


bcache0 is not the last level to allocate minor number, bcache0p1 is.
What we should fix might be:
/dev/bcache0 has minor 0
/dev/bcache1 has minor 16
/dev/bcache2 has minor 32

Maybe I didn't understand you correctly. Can your patch make sure all
partitions of a bcache device have adjacent minor numbers ? Correct me
if I am wrong.


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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux