[libvirt] [PATCH]lxc: remove redundant mount operation
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> If we do not specify a readonly mount, we don't need to re-mount it again. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_container.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 255c711..351217a 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1126,13 +1126,6 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs, _("Failed to make directory %s readonly"), fs->dst); } - } else { - VIR_DEBUG("Binding %s readwrite", fs->dst); - if (mount(src, fs->dst, NULL, MS_BIND|MS_REMOUNT, NULL) < 0) { - virReportSystemError(errno, - _("Failed to make directory %s readwrite"), - fs->dst); - } } ret = 0; -- 1.8.2.1
ping
-----Original Message----- From: Chen Hanxiao [mailto:chenhanxiao@cn.fujitsu.com] Sent: Friday, November 08, 2013 4:31 PM To: libvir-list@redhat.com Cc: chenhanxiao@cn.fujitsu.com Subject: [libvirt][PATCH]lxc: remove redundant mount operation
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If we do not specify a readonly mount, we don't need to re-mount it again.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_container.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 255c711..351217a 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1126,13 +1126,6 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs, _("Failed to make directory %s readonly"), fs->dst); } - } else { - VIR_DEBUG("Binding %s readwrite", fs->dst); - if (mount(src, fs->dst, NULL, MS_BIND|MS_REMOUNT, NULL) < 0) { - virReportSystemError(errno, - _("Failed to make directory %s readwrite"), - fs->dst); - } }
ret = 0; -- 1.8.2.1
ping
-----Original Message----- From: libvir-list-bounces@redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of Chen Hanxiao Sent: Tuesday, December 03, 2013 4:37 PM To: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]lxc: remove redundant mount operation
ping
-----Original Message----- From: Chen Hanxiao [mailto:chenhanxiao@cn.fujitsu.com] Sent: Friday, November 08, 2013 4:31 PM To: libvir-list@redhat.com Cc: chenhanxiao@cn.fujitsu.com Subject: [libvirt][PATCH]lxc: remove redundant mount operation
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If we do not specify a readonly mount, we don't need to re-mount it again.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_container.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 255c711..351217a 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1126,13 +1126,6 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs, _("Failed to make directory %s readonly"), fs->dst); } - } else { - VIR_DEBUG("Binding %s readwrite", fs->dst); - if (mount(src, fs->dst, NULL, MS_BIND|MS_REMOUNT, NULL) < 0) { - virReportSystemError(errno, - _("Failed to make directory %s readwrite"), - fs->dst); - } }
ret = 0; -- 1.8.2.1
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On 11/08/2013 04:30 PM, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If we do not specify a readonly mount, we don't need to re-mount it again.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> ---
Looks good to me. ACK
src/lxc/lxc_container.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 255c711..351217a 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1126,13 +1126,6 @@ static int lxcContainerMountFSBind(virDomainFSDefPtr fs, _("Failed to make directory %s readonly"), fs->dst); } - } else { - VIR_DEBUG("Binding %s readwrite", fs->dst); - if (mount(src, fs->dst, NULL, MS_BIND|MS_REMOUNT, NULL) < 0) { - virReportSystemError(errno, - _("Failed to make directory %s readwrite"), - fs->dst); - } }
ret = 0;
On Fri, Nov 08, 2013 at 04:30:37PM +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If we do not specify a readonly mount, we don't need to re-mount it again.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_container.c | 7 ------- 1 file changed, 7 deletions(-)
ACK & pushed. Sorry for the delay in responding. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Chen Hanxiao -
Daniel P. Berrange -
Gao feng