[PATCH] [UBI] 1/5 - UBI notifications, take two

Artem Bityutskiy dedekind at infradead.org
Thu Dec 18 06:14:30 EST 2008


On Thu, 2008-12-18 at 13:11 +0200, Artem Bityutskiy wrote:
> > > > The ubi_enum_volumes could open the volume with the flag
> > > > UBI_OPEN_INTERNAL and thus release spinlock when calling notifiers.
> > > 
> > > You may introduce a "ubi_get_volume(struct ubi_info *ubi, int vol_id)"
> > > function, similar to the existing "ubi_get_device(int ubi_num)"
> > > function. However, it looks like you may just use UBI_READONLY instead.
> > > It will not prevent the "notifyees" to open the volume in UBI_READWRITE
> > > mode.
> > But will prevent opening in UBI_EXCLUSIVE. OK, get_volume/put_volume
> > looks as the right way to go.
> 
> It will prevent exlusive, as well as get/put must prevent exclusive, so
> there should be no difference for you at all. Exclusive is used when the
> module is removed or re-sized, and there must be zero users if these
> operations are performed.

IOW, these get/put volume calls should not bring any value for you and
seem to be unnecessary.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list