Re: [PATCH 2/2] Btrfs: fix wrong the mount information in /proc

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

 



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.
--
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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux