Thread (4 messages) 4 messages, 3 authors, 2012-05-31

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

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: 2012-05-31 15:53:07
Also in: linux-fsdevel

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:
quoted
+#include "../mount.h"
No.
quoted
+	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help