From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:43940 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbeEOFSG (ORCPT ); Tue, 15 May 2018 01:18:06 -0400 Received: by mail-pf0-f196.google.com with SMTP id j20-v6so7110952pff.10 for ; Mon, 14 May 2018 22:18:06 -0700 (PDT) Date: Tue, 15 May 2018 13:18:00 +0800 From: Yecheng Fu To: Matthew Wilcox 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: <20180515051758.GA10231@jupiter.local> References: <1524109641-45617-1-git-send-email-cofyc.jackson@gmail.com> <20180419113256.GC5556@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180419113256.GC5556@bombadil.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Apr 19, 2018 at 04:32:56AM -0700, Matthew Wilcox wrote: > 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 hi, I'm a newbie here. Will this be merged or is there still something I need to do? I had submitted a patch to [util-linux](https://github.com/karelzak/util-linux/pull/619). Karel prefer kernel side bugfix than rewrite all the sscanf() stuff and I agree. Kernel side bugfix also fixes all parsers too. -- Yecheng Fu