Skip to content

Commit d6fd419

Browse files
committed
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 <[email protected]> Reported-by: Oleg Kravtsov <[email protected]> Reviewed-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent b0dd940 commit d6fd419

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4029,6 +4029,9 @@ smb2_writev_callback(struct mid_q_entry *mid)
40294029
wdata->cfile->fid.persistent_fid,
40304030
tcon->tid, tcon->ses->Suid, wdata->offset,
40314031
wdata->bytes, wdata->result);
4032+
if (wdata->result == -ENOSPC)
4033+
printk_once(KERN_WARNING "Out of space writing to %s\n",
4034+
tcon->treeName);
40324035
} else
40334036
trace_smb3_write_done(0 /* no xid */,
40344037
wdata->cfile->fid.persistent_fid,

0 commit comments

Comments
 (0)