From patchwork Wed Feb 5 23:04:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11367351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DB0A139A for ; Wed, 5 Feb 2020 23:05:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C27E20730 for ; Wed, 5 Feb 2020 23:05:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BLZVZZkJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbgBEXEe (ORCPT ); Wed, 5 Feb 2020 18:04:34 -0500 Received: from mail-il1-f178.google.com ([209.85.166.178]:39229 "EHLO mail-il1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbgBEXEe (ORCPT ); Wed, 5 Feb 2020 18:04:34 -0500 Received: by mail-il1-f178.google.com with SMTP id f70so3390830ill.6 for ; Wed, 05 Feb 2020 15:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=w1PUhh1S3rBKKi5/fO6aSNAouKANmIQH2C94TgiDlvc=; b=BLZVZZkJ46msYtDj2uKmQMB90gcqhhUDlKK36dGCEukI90qJ7P1/ztdJhy6o2iWz3h 38QSa6ZNvPoEc0b04Zge31xIqW6lg/pftUOr8mInhG4BtJM4LxxU6KTUoNG/W5kHnCtl abQvz2dXkGCE9W0f9kPZyszS95A0ltvUigG/cDeSUhz4ax0HheaQbUyIUBQNYcLQn9Lh pDo9KOsYqTwaG3/6oQNFueQgPW8MG/y8ISMMjqn2rehvkUKosch5pdMv8sffL2DQnXxU JbmgMAuW/Z8BAb7nJkB/N82dwQN1aRF6y75czMLTUDQBCvAkbGLItjS1+FbF8nfNY/63 Ho8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=w1PUhh1S3rBKKi5/fO6aSNAouKANmIQH2C94TgiDlvc=; b=U9xaYLzfOdxelZLV9ag1njqeiAIi0QxIOeLgtyZUYcNKJc4Ws15bI4YRFx4yErEB4a S+ifrbsm9jU8rA2bxHjTEIkbKPrDoZvgq4uD7n3LQmTcPy2+veKl9SIcZ0KzX5sWyk24 IsSvrz+nMUTwaV+gQOYIuXIX44AUlVmU3oB8AwrhfvIOapqMJKts8dMfTJjcJaW40BlU Fs5qVyOOWmKl5DSO33UsPT1LK+mZDbHts1oEFp1qULLODE50CIjlhQVMaP/XdVcnxQ14 OOGj8fPB3C1ikCm05bIHel9RRwb/41zvHH9MTrItgJVFHApnN90R8ZpifV8andm4OyfG Utsw== X-Gm-Message-State: APjAAAXVoHVmM2dxaS2gHhN5QWn8yNTkBAZW3VMIkGTdsOAhjmbLESHD jjLJ9Zw8Bkj8w7JAMzNDya0UkC/00rT8n4DrzGaD1/5d X-Google-Smtp-Source: APXvYqwx6HXjclPAGFRy4SW2ZeIcRBnNZT+hIY9+kz7I+AIT2dFAchIqUEhyH2Peqpr/f23YYwxho4JXFRI3yOReEkQ= X-Received: by 2002:a92:9f1b:: with SMTP id u27mr596800ili.173.1580943873757; Wed, 05 Feb 2020 15:04:33 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Wed, 5 Feb 2020 17:04:22 -0600 Message-ID: Subject: [CIFS][PATCH] log warning once if out of disk space error on write To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Had a confusing problem reported - turned out to be out of disk space due to a write with large offset on a non-sparse file. Having a warning message logged once would have helped. Reviewed-by: Pavel Shilovsky From 7326217e700e293beca1f8b39cdf11ba1d248438 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 5 Feb 2020 16:52:11 -0600 Subject: [PATCH] cifs: log warning message (once) if out of disk space 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: x[ 8407.391909] Out of space writing to \\oleg-server\small-share Signed-off-by: Steve French Reported-by: Oleg Kravtsov Reviewed-by: Ronnie Sahlberg --- fs/cifs/smb2pdu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 7996d81230aa..1a732ff71de4 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -4029,6 +4029,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