From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:38874 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbeDSLc7 (ORCPT ); Thu, 19 Apr 2018 07:32:59 -0400 Date: Thu, 19 Apr 2018 04:32:56 -0700 From: Matthew Wilcox To: Yecheng Fu Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, Karel Zak Subject: Re: [PATCH v2] vfs: use "none" if mount source is empty string Message-ID: <20180419113256.GC5556@bombadil.infradead.org> References: <1524109641-45617-1-git-send-email-cofyc.jackson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1524109641-45617-1-git-send-email-cofyc.jackson@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Apr 19, 2018 at 11:47:21AM +0800, Yecheng Fu wrote: > `libmount` from util-linux and many softwares in userspace (e.g. > kubelet) did not expect empty string as mount source: > > ``` > $ mount -t tmpfs "" /mnt/tmpfs > $ findmnt /mnt/tmpfs > findmnt: /proc/self/mountinfo: parse error at line 51 > $ cat /proc/self/mountinfo | grep -P '\/mnt\/tmpfs' > 74 25 0:59 / /mnt/tmpfs rw,relatime shared:38 - tmpfs rw > $ cat /proc/self/mounts | grep -P '\/mnt\/tmpfs' > /mnt/tmpfs tmpfs rw,relatime 0 0 > ``` > > `source` field in mounts/mountinfo is empty, which breaks a lot of > mounts/mountinfo parsers. > > This fixes issues in parsing when user uses empty string as mount > source. > > Cc: Karel Zak > Signed-off-by: Yecheng Fu Reviewed-by: Matthew Wilcox