Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp734981imm; Mon, 1 Oct 2018 18:17:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV62R/o8uEocdedlZfCAi0ZPxw912Be3eoSnUCpJP3vD9SqpbT6dCdwQUiuZJlEBMeS4GIaZ+ X-Received: by 2002:a17:902:e5:: with SMTP id a92-v6mr14237613pla.273.1538443078043; Mon, 01 Oct 2018 18:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538443078; cv=none; d=google.com; s=arc-20160816; b=m5xlYlFgX/af3mIlyloK6j+0t4+C7WrsoEp8pszgbU7ax3hbfqUncYB2uHHos/bDFL Rz/jFPyVQbsYX9cFLX9CXvFZuscXvWC6LzUnc3NIqLEkFl7AllKAKk4f6aa4TG1M71sl XEJ2FGOk77aJr/5pH3HGpPJcQwCKejvsvXsyiio4uYx9O1j1HboixxhcL4wKxH015eox 6TqCdRou6ZoQzS3F13zJQFTiz37YYEU71koG1wAdL3bjEFH7Jg+oUlRYsNMq+rmbjy2Y x/0oVbzebFjDgmKy1+wXEeCgd8fA3ifAPCy2eLa5wRQicDOyZ7WiiNy3y9uipnv+xbkE J1Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IhmSTjit+371V2yMzx89W1i4kUHlGAQnNmreFIYpziw=; b=Rfg1ZWTlzLj8HYexcodP1te7rQWOEVReyuObkCTTrxsREN1QGXtcmeJM6Xqw8xErCo 907bqOzhV5DKGMp4jLBRkOgQH2+dvuYoZGNul9coHiC9Xk1n3cFFfkFDKHpzlZVLcTgP +Quxw0LsWTs/6bKdzLmTngeMCUnBSsLqQX3uwcDcp7SjqwD8aKGANhIgzMJfJhY1cLNY e4hQbkoiU9H0rep8zXoJ1ivcQ2C+ZubbyxWwrJhHuDuQZPQyyIlwqtjsbdUWrC6mZVgd XbNuFbvQtjj1ArA1BoBoITQSARRLHUafsjDazchDBRAVtfIW56sV1mfVfsj2/nLq6sg9 STxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AFphoySQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i37-v6si13422041pgi.15.2018.10.01.18.17.43; Mon, 01 Oct 2018 18:17:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AFphoySQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbeJBH4w (ORCPT + 99 others); Tue, 2 Oct 2018 03:56:52 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38277 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbeJBH4w (ORCPT ); Tue, 2 Oct 2018 03:56:52 -0400 Received: by mail-lj1-f196.google.com with SMTP id p6-v6so228935ljc.5; Mon, 01 Oct 2018 18:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IhmSTjit+371V2yMzx89W1i4kUHlGAQnNmreFIYpziw=; b=AFphoySQPDbaqJ84kY9V5TVV2t0Uv9bcjx/8DSp3d9IhBgik3s+gozo1zxgPs385XE GSVEm3EZh/vE1hak0qgC4/l6l/aq+lMSO4BnnNYc60sdVGHZ+haucc7iv2B2pIsm9YvN niscWEhwIv3Gnc8tMYNSNpDDfpKbbWVNX4VzLNJUZeb85J8zM1Ndiz5cCX8SCXx+QYhh g8enTSh6zBO/pHPiyYRpMjn9WjGR2ispc3/zmO047/fG/YOh8Ps6Zs/Kb+q1pJDhr/aH vW/TGBL8H+4UvToWdSWSFBQ8zp/CMMPDOkRtmLuBb9IGztehe8vk+RDSn0SDNZi9siw4 JHpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IhmSTjit+371V2yMzx89W1i4kUHlGAQnNmreFIYpziw=; b=NRc+BNOJ7VVOT1+C5LosyCP9+XqWGZIK6yyFVF5vuhmfzai4qHPT6U/p+8m0n5PrZr tA5gF+z276FpxwuaqM1VfDRsxXJr5nYDsMVE66N4r4qr/3JjQD+96WExbocoAMwNhkLO +PwHwsozkc+uEzxMfP0y58ll9C8n7ZTEUwu2WqYpwAkMpAweT9aB+7xco9UZGscfAVfO S6ANdtSiSpt4vk+BK66Q2Z+5tzZw7xLhvJIdhqEvJ2TXue/vj//7ypigH+4FFlQw0nwR +hulKv7ShpFOHfksniguTdg0MCuwenvJqd3pFfYzx03XMbK+RjiPiHJDbqXfyCpnsVvg epuw== X-Gm-Message-State: ABuFfohIeRavewqQCzyUDJeW3N8nC67T6RAUIttte8TYRqWfIF55wJ0x zSi9J8wGrynf9eeHo1q1QWMb9UI0GctEb6EAPQ== X-Received: by 2002:a2e:21d2:: with SMTP id h79-v6mr7655713lji.46.1538442973518; Mon, 01 Oct 2018 18:16:13 -0700 (PDT) MIME-Version: 1.0 References: <463f424e3d4724a4ab7b84c395e7b0cf3068e31f.1538441538.git.rfreire@redhat.com> In-Reply-To: <463f424e3d4724a4ab7b84c395e7b0cf3068e31f.1538441538.git.rfreire@redhat.com> From: Pavel Shilovsky Date: Mon, 1 Oct 2018 18:16:02 -0700 Message-ID: Subject: Re: [PATCH] CIFS: Print message when attempting mount To: rfreire@redhat.com Cc: Kernel Mailing List , Steve French , linux-cifs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =D0=BF=D0=BD, 1 =D0=BE=D0=BA=D1=82. 2018 =D0=B3. =D0=B2 17:59, Rodrigo Frei= re : > > By default, no messages are printed when mounting a CIFS filesystem. > This information is valuable when troubleshooting and/or forensic > analyzing a system and finding out if was a CIFS endpoint mount > attempted. > Other filesystems such as XFS, EXT* does issue a printk() when mounting > their filesystems. > > Sample output: > > [root@ll-rhel7 ~]# mount -o user=3Dadministrator //172.25.250.18/c$ /mnt > (non-existent system) > > [root@ll-rhel7 ~]# mount -o user=3Dadministrator //172.25.250.19/c$ /mnt > (Valid system) > > Kernel message log: > > [ 450.464543] CIFS VFS: Attempting to mount //172.25.250.18/c$ > [ 456.478186] CIFS VFS: Error connecting to socket. Aborting operation. > [ 456.478381] CIFS VFS: cifs_mount failed w/return code =3D -113 > [ 467.688866] CIFS VFS: Attempting to mount //172.25.250.19/c$ > > Signed-off-by: Rodrigo Freire Hi Rodrigo, > --- > fs/cifs/cifsfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c > index 7065426..3f5a31e 100644 > --- a/fs/cifs/cifsfs.c > +++ b/fs/cifs/cifsfs.c > @@ -707,6 +707,7 @@ static int cifs_set_super(struct super_block *sb, voi= d *data) > struct cifs_mnt_data mnt_data; > struct dentry *root; > > + cifs_dbg(VFS, "Attempting to mount %s\n", dev_name); > cifs_dbg(FYI, "Devname: %s flags: %d\n", dev_name, flags); Let's change the next FYI line to not contain devname thus avoiding duplicate logging when FYI is enabled. > > volume_info =3D cifs_get_volume_info((char *)data, dev_name, is_s= mb3); > -- > 1.8.3.1 > Other than the comment above I agree with the change. -- Best regards, Pavel Shilovsky