From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 426F7C35641 for ; Fri, 21 Feb 2020 08:16:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E2AC2467B for ; Fri, 21 Feb 2020 08:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273002; bh=FJog/hBzuEntMPGFGJZEiaIKgbnfeYjzMZKVtSXEULw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rBWvL/iqI39NfTeAxICPppR5s/ti/AoQyTwJkMR2vphbGV4ww6JdZwWZPULocfdYI XI/RLTG+eezqVj9u22D5wfPnsyRfGz+IF7vO7y4PQOHbn5/7ZYVCrgiSI3uFsYv4Hr SSpZPcVBbN2LRUFd3bdmq9IuSyKpfGIjnLUVX2lg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387558AbgBUIQk (ORCPT ); Fri, 21 Feb 2020 03:16:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:53608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387544AbgBUIQc (ORCPT ); Fri, 21 Feb 2020 03:16:32 -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 D5A8E24682; Fri, 21 Feb 2020 08:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272991; bh=FJog/hBzuEntMPGFGJZEiaIKgbnfeYjzMZKVtSXEULw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rsut+D/Pm0b3RGqDwdKHmBKWYpUdj1AuV3obOHCo9u2zBYMxfZSIfHdUalNj+JDHt 1FlNTI1peN/1ekFF7WtqX8jQfgQwSUSeGQpj0OXS5ZPrkkSuADZkjSy3ccuDuRrR0L NcePLLRpSr1RXextp0SqxR6+dARJlb+VgYgHdu5Q= 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 5.4 338/344] cifs: log warning message (once) if out of disk space Date: Fri, 21 Feb 2020 08:42:17 +0100 Message-Id: <20200221072421.125048821@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072349.335551332@linuxfoundation.org> References: <20200221072349.335551332@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 06d932ed097e5..c6fc6582ee7bc 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3917,6 +3917,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