Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1620219ybv; Fri, 21 Feb 2020 00:25:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwjj0u+R3ItVr6FNUh9KRTn2nN8zExn9wn7CS/3dPfXiyDZJIOJmdNd4sNmH0sD/QEvYjLY X-Received: by 2002:a9d:6a53:: with SMTP id h19mr28103540otn.120.1582273544193; Fri, 21 Feb 2020 00:25:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273544; cv=none; d=google.com; s=arc-20160816; b=iZuUG4Yo02EKrrFmtZ7EIgO+S8ABmNhb2bXrXvKBQJ04+flXSjpSo4j2MOYHAGbU2W RTFupnow0tfUm3auZ3R877sgCmSW5Er7+7QH2K+3qdrGyWB+UsmeNC7lnOgb4DoBDYUq vvH6evc6H9BpcvsgE4mc9Erqy+W34cCEEd0umd6xt0FqBRd24FGqRvXHT4DuO/I57qej Y1gBS0TRwoeScf3XucAVIraUo0G6oZ1v8BqDiPALb/NSRteXqkAt+x+z7/QYb8h4x+aH pc5i8SciFjeDU3cM/PpPLhK48trKGQNz2e69V++ovRqoYPDKNb6iKCXrmdKfcCWzphkw nG1Q== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mzEHY4goD99GUAJcIIozH4aVvNz/7e5zPx5MNxxlbFA=; b=PzepeoqoY4qavXmxK/oKomYbmYJ83soOB3t4vIKODehNZKlmnLQVZAu8ijjoWtOJ2B /mBPytOB1Cvnk+QTUOBiAcwD2DXeeFDvMVxstl2kgT8OAR/prC7qHnCYBXlt2FrDUsyb oAY9UreZixexffHREB9u+QSqJxfuTQZ1YpWTWG5HbiEgFYOKlxm6c7TKTPHNFsDiWI6R BjA3PBUQ8erV1GgXGBOKhckxhqV+7gW2bxk6Jf9R5lpjEvuQKYO3I2fF4VUUNrMPGwVR SCgtxKrW0SDSgai0RFbIhuPrayXt/EEzdkbshXvM0XACegBRzk1gi8YoXtlUcalls151 17ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pb5F8teg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si1166712otg.113.2020.02.21.00.25.31; Fri, 21 Feb 2020 00:25:44 -0800 (PST) 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=@kernel.org header.s=default header.b=Pb5F8teg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388709AbgBUIYy (ORCPT + 99 others); Fri, 21 Feb 2020 03:24:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:37334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388687AbgBUIYp (ORCPT ); Fri, 21 Feb 2020 03:24:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DA4A2469F; Fri, 21 Feb 2020 08:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273484; bh=Dsh/Qd043VlBj8iAhdts5UbxfZgcXm4Hu4M2aPNVJ/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pb5F8teg/hNA07G7BP3RS7poI6CLKXhERBNOc5gPk6wQNfjIobCcexZF6v80lApC4 qG25xwOhXoW88lx6gXBweXar643/kKr9ZVbBOqIuX8jphyPNB41eP5qrpfZ8SnS2FA xSUJHuPOwLLYYnPqzYHwSrxK0RxRfoEiWlOvDd2k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Oleg Kravtsov , Ronnie Sahlberg , Pavel Shilovsky , Sasha Levin Subject: [PATCH 4.19 188/191] cifs: log warning message (once) if out of disk space Date: Fri, 21 Feb 2020 08:42:41 +0100 Message-Id: <20200221072313.381537875@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve French [ Upstream commit d6fd41905ec577851734623fb905b1763801f5ef ] We ran into a confusing problem where an application wasn't checking return code on close and so user didn't realize that the application ran out of disk space. log a warning message (once) in these cases. For example: [ 8407.391909] Out of space writing to \\oleg-server\small-share Signed-off-by: Steve French Reported-by: Oleg Kravtsov Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Sasha Levin --- fs/cifs/smb2pdu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 0d4e4d97e6cf5..e2d2b749c8f38 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3425,6 +3425,9 @@ smb2_writev_callback(struct mid_q_entry *mid) wdata->cfile->fid.persistent_fid, tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes, wdata->result); + if (wdata->result == -ENOSPC) + printk_once(KERN_WARNING "Out of space writing to %s\n", + tcon->treeName); } else trace_smb3_write_done(0 /* no xid */, wdata->cfile->fid.persistent_fid, -- 2.20.1