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: 1234052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BLZVZZkJ; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48CcbK0Mtnz9sRK for ; Thu, 6 Feb 2020 10:05:01 +1100 (AEDT) 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