On Thu, May 31, 2012 at 04:53:04PM +0100, Al Viro wrote: > On Thu, May 31, 2012 at 03:36:05PM +0100, Al Viro wrote: > > On Thu, May 31, 2012 at 06:25:14PM +0800, Miao Xie wrote: > > > +#include "../mount.h" > > > > No. > > > > > + struct mount *r = real_mount(mnt); > > > > And even more so. Find a way to do that without layering violations or > > live with the current behaviour. > > > > Both patches NAKed with extreme prejudice. Don't bring them back, you > > are *not* going to get them in. Any filesystem code that wants to do > > that kind of thing is seriously out of luck. > > BTW, resulting behaviour is bogus, regardless of layering violations - > note that device_list_add() renames existing btrfs_device. *And* does so > without holding ->device_list_mutex, so your patch would've cheerfully > walked right into strcmp() vs. kfree() races. And while the order of > kfree vs. reassignment in device_list_add() is clearly wrong, flipping it > won't fix that problem. > > Try to formulate the rules for names you are generating - when do they > change, what can we say about two mounts by comparing these names, > when can two that used to give different names start giving the same > and vice versa. You won't be happy with the result. I'm fixing this up right now and then I'll also fix the show_devname thing, we can just keep track of which device mount() was called with so that we can print that out and then if that device is ever removed we can just print out something different. Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html