summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-02-05 16:52:11 -0600
committerSteve French <stfrench@microsoft.com>2020-02-05 17:58:52 -0600
commitd6fd41905ec577851734623fb905b1763801f5ef (patch)
treeb5919a243c2a179e61d8359dd6d91a38a94bf47c /fs/cifs
parentb0dd940e582b6a60296b9847a54012a4b080dc72 (diff)
downloadblackbird-op-linux-d6fd41905ec577851734623fb905b1763801f5ef.tar.gz
blackbird-op-linux-d6fd41905ec577851734623fb905b1763801f5ef.zip
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: [ 8407.391909] Out of space writing to \\oleg-server\small-share Signed-off-by: Steve French <stfrench@microsoft.com> Reported-by: Oleg Kravtsov <oleg@tuxera.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 3 insertions, 0 deletions
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,
OpenPOWER on IntegriCloud