Re: [PATCH 1/7] shared subtree
> > static struct vfsmount *propagation_next(struct vfsmount *p, > > struct vfsmount *base) > > { > > /* first iterate over the slaves */ > > if (!list_empty(&p->mnt_slave_list)) > > return first_slave(p); > > I think this code should be > if (!list_empty(&p->mnt_slave)) > return next_slave(p); > > Right? I think I get the idea. This is a depth-first search, so first_slave() is right. Here's a less buggy (and even more simplified) version of the function. Note: it must be called with 'origin' either on a slave list or at the root pnode. That's because the function checks if the all vfsmounts in a pnode have been traversed by looking at the emptiness of mnt_slave. So if origin was in a slave pnode, but is not the actual slave link, the algorithm will go off the starting pnode and up to it's master. So here's a preparation function that finds the right place to start the propagation. static struct vfsmount *propagation_first(struct vfsmount *p) { struct vfsmount *q = p; while (list_empty(&q->mnt_slave)) { q = next_shared(q); if (q == p) break; } return q; } static struct vfsmount *propagation_next(struct vfsmount *p, struct vfsmount *origin) { /* are there any slaves of this mount? */ if (!list_empty(&p->mnt_slave_list)) return first_slave(p); while (1) { /* if p->mnt_share is empty, this is a no-op */ p = next_shared(p); /* finished traversing? */ if (p == origin) break; /* more vfsmounts belong to the pnode? */ if (list_empty(&p->mnt_slave)) return p; /* more slaves? */ if (p->mnt_slave.next != &p->mnt_master->mnt_slave_list) return next_slave(p); /* back at master */ p = p->mnt_master; } return NULL; } - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Bul_Birini:)
http://www.birinibul.com/?up=213 Birinibul.com nedir? Çalýþan, kariyerine önem veren ve iþ hayatýnýn zorluklarý ile uðraþýrken bir sevgiliye zaman ayýramayan, yetiþkin kadýnlarý ve erkekleri buluþturmak için kurulmuþ bir sitedir. Birinibul.com'da, eðiliminize ve isteklerinize uygun üyeleri arayýp bulabilir ve onlar ile mesajlaþabilirsiniz. Üye olma sýrasýnda, adýnýz, adresiniz, telefonunuz gibi size özel hiçbir bilgiyi vermeniz gerekmiyor. Sadece özelliklerinizi ve aradýðýnýz özellikleri girerek 1 dakika içinde siz de bize katýlabilirsiniz. http://www.birinibul.com/?up=213 - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/7] shared subtree
On Thu, 2005-07-28 at 02:57, Miklos Szeredi wrote: > > > This is an example, where having struct pnode just complicates things. > > > If there was no struct pnode, this function would be just one line: > > > setting the shared flag. > > So your comment is mostly about getting rid of pnode and distributing > > the pnode functionality in the vfsmount structure. > > Yes, sorry if I didn't make it clear. > > > I know you are thinking of just having the necessary propogation list in > > the vfsmount structure itself. Yes true with that implementation the > > complication is reduced in this part of the code, but really complicates > > the propogation traversal routines. > > On the contrary, I think it will simplify the traversal routines. > > Here's an iterator function I coded up. Not tested at all (may not > even compile): Your suggested code has bugs. But I understand what you are aiming at. Maybe you are right. I will try out a implementation using your idea. Hmm.. lots of code change, and testing. > > struct vfsmount { > /* ... */ > > struct list_head mnt_share; /* circular list of shared mounts */ > struct list_head mnt_slave_list; /* list of slave mounts */ > struct list_head mnt_slave; /* slave list entry */ > struct vfsmount *master; /* slave is on master->mnt_slave_list > */ > }; > > static inline struct vfsmount *next_shared(struct vfsmount *p) > { > return list_entry(p->mnt_share.next, struct vfsmount, mnt_share); > } > > static inline struct vfsmount *first_slave(struct vfsmount *p) > { > return list_entry(p->mnt_slave_list.next, struct vfsmount, mnt_slave); > } > > static inline struct vfsmount *next_slave(struct vfsmount *p) > { > return list_entry(p->mnt_slave.next, struct vfsmount, mnt_slave); > } > > static struct vfsmount *propagation_next(struct vfsmount *p, >struct vfsmount *base) > { > /* first iterate over the slaves */ > if (!list_empty(&p->mnt_slave_list)) > return first_slave(p); I think this code should be if (!list_empty(&p->mnt_slave)) return next_slave(p); Right? I think I get the idea. RP > > while (1) { > struct vfsmount *q; > > /* more vfsmounts belong to the pnode? */ > if (!list_empty(&p->mnt_share)) { > p = next_shared(p); > if (list_empty(&p->mnt_slave) && p != base) > return p; > } > if (p == base) > break; > > BUG_ON(list_empty(&p->mnt_slave)); > > /* more slaves? */ > q = next_slave(p); > if (p->master != q) > return q; > > /* back at master */ > p = q; > } > > return NULL; > } > > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Camera formatted SD problem
On Fri, Jul 29, 2005 at 05:37:01PM +0530, Mukund JB. wrote: > I have a problem with mounting the SD cards formatted on the digital > camera on my Linux BOX. > I am using the 2.6.10 kernel on FC2. But I am able to mount and > access the same devices on WinXP. I suggest you talk to your colleague "Srinivas G." <[EMAIL PROTECTED]> who just asked the same question on the kernelnewbies mailing list. Erik -- +-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Camera formatted SD problem
Dear all, I have a problem with mounting the SD cards formatted on the digital camera on my Linux BOX. I am using the 2.6.10 kernel on FC2. But I am able to mount and access the same devices on WinXP. I think someone might have faced the same problem. Did u find some solution to this? Please convey if any. Does the linux kernel have the support for FAT12 fs? I suppose it does. But, why am I not able to mount the device. Where is the support missing? Should this be supported by the Linux kernel block layer or the SD driver? Regards, Mukund jampala - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html