The Samba-Bugzilla – Attachment 13583 Details for
Bug 12144
Incorrect response to FSCTL_SET_COMPRESSION request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cherry picked fix for 4.6.next
bso12144_fix_set_cmprn_46.patch (text/plain), 2.32 KB, created by
David Disseldorp
on 2017-09-12 15:41:34 UTC
(
hide
)
Description:
cherry picked fix for 4.6.next
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2017-09-12 15:41:34 UTC
Size:
2.32 KB
patch
obsolete
>From 5d413790775d7d83ee8cbb232db51bcd551c4645 Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Thu, 5 Jan 2017 17:36:02 +0100 >Subject: [PATCH] smbd/ioctl: match WS2016 ReFS set compression behaviour > >ReFS doesn't support compression, but responds to set-compression FSCTLs >with NT_STATUS_OK if (and only if) the requested compression format is >COMPRESSION_FORMAT_NONE. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12144 > >Reported-by: Nick Barrett <nick@barrett.org.nz> >Signed-off-by: David Disseldorp <ddiss@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Mon Jan 9 23:14:28 CET 2017 on sn-devel-144 > >(cherry picked from commit 28cc347876b97b7409d6efd377f031fc6df0c5f3) >--- > source3/smbd/smb2_ioctl_filesys.c | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) > >diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c >index f2a05540c77..64b54548197 100644 >--- a/source3/smbd/smb2_ioctl_filesys.c >+++ b/source3/smbd/smb2_ioctl_filesys.c >@@ -104,11 +104,6 @@ static NTSTATUS fsctl_set_cmprn(TALLOC_CTX *mem_ctx, > return status; > } > >- if ((fsp->conn->fs_capabilities & FILE_FILE_COMPRESSION) == 0) { >- DEBUG(4, ("FS does not advertise compression support\n")); >- return NT_STATUS_NOT_SUPPORTED; >- } >- > ndr_ret = ndr_pull_struct_blob(in_input, mem_ctx, &cmpr_state, > (ndr_pull_flags_fn_t)ndr_pull_compression_state); > if (ndr_ret != NDR_ERR_SUCCESS) { >@@ -116,15 +111,22 @@ static NTSTATUS fsctl_set_cmprn(TALLOC_CTX *mem_ctx, > return NT_STATUS_INVALID_PARAMETER; > } > >- status = SMB_VFS_SET_COMPRESSION(fsp->conn, >- mem_ctx, >- fsp, >- cmpr_state.format); >- if (!NT_STATUS_IS_OK(status)) { >- return status; >+ status = NT_STATUS_NOT_SUPPORTED; >+ if (fsp->conn->fs_capabilities & FILE_FILE_COMPRESSION) { >+ status = SMB_VFS_SET_COMPRESSION(fsp->conn, >+ mem_ctx, >+ fsp, >+ cmpr_state.format); >+ } else if (cmpr_state.format == COMPRESSION_FORMAT_NONE) { >+ /* >+ * bso#12144: The underlying filesystem doesn't support >+ * compression. We should still accept set(FORMAT_NONE) requests >+ * (like WS2016 ReFS). >+ */ >+ status = NT_STATUS_OK; > } > >- return NT_STATUS_OK; >+ return status; > } > > static NTSTATUS fsctl_zero_data(TALLOC_CTX *mem_ctx, >-- >2.13.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 12144
:
12539
|
12548
|
12549
|
12805
|
12806
| 13583 |
13615