Re: [PATCH] Bind Mount Extensions 0.04

From: Herbert Poetzl
Date: Mon Mar 15 2004 - 00:38:50 EST


On Mon, Mar 15, 2004 at 05:59:52AM +0100, Willy Tarreau wrote:
> Hi Herbert,
>
> On Mon, Mar 15, 2004 at 04:53:51AM +0100, Herbert Poetzl wrote:
>
> > an older version of this patch was included in 2.6.0-test6-mm2,
> > and it is currently used by several people, without any issues,
> > so I'd kindly request to consider it for inclusion into mainline.
>
> I have tested 0.03 on 2.4.25 + some other patches, and discovered something
> annoying : an attempt to change something on the R/O FS marked the parent
> FS busy. But I cannot say for sure that it was a problem with your patch,
> because that kernel had several others. I'll try to reproduce on a naked
> kernel. To reproduce it, you can try this :

it _was_ an issue with 0.03 on 2.4.25 (see changelog)

> # mount /dev/hdaXX /mnt/disk
> # mount -r --bind /mnt/disk /mnt/ro
> # touch /mnt/ro/foo
> Read-only file-system (that's what was expected)
> # umount /mnt/ro
> (I don't remember if the problem already arises here)
> # umount /mnt/disk
> device is busy

this has been fixed in 0.04 for 2.4.25, if you need
the fix to include for 0.03 (for whatever reason)
here is the relevant hunk ..

--- linux-2.4.25-bme0.03/fs/namei.c 2004-03-10 14:45:36.000000000 +0100
+++ linux-2.4.25-bme0.04/fs/namei.c 2004-03-10 12:18:35.000000000 +0100
@@ -1045,7 +1045,7 @@ int open_namei(const char * pathname, in
return error;
error = -EROFS;
if (MNT_IS_RDONLY(nd->mnt))
- return error;
+ goto exit;

/*
* We have the parent and last component. First of all, check

> Other than that, this feature is really excellent !

thanks for using it ...

> Thanks,
> Willy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/