From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Disseldorp Subject: Re: [[PATCH v2] [CIFS] Allow setting per-file compression via SMB2 and SMB3 Date: Wed, 9 Oct 2013 00:25:45 +0200 Message-ID: <20131009002545.114ae8a5@plati.site> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-fsdevel , samba-technical To: Steve French Return-path: In-Reply-To: Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Hi Steve, On Tue, 8 Oct 2013 15:41:17 -0500 Steve French wrote: > + /* Currently only flag we can set is compressed flag */ > + if ((ExtAttrBits & FS_COMPR_FL) == 0) > + break; > + > + /* Try to set compress flag */ > + if (tcon->ses->server->ops->set_compression) { > + rc = tcon->ses->server->ops->set_compression( > + xid, tcon, pSMBFile); > + cifs_dbg(FYI, "set compress flag rc %d\n", rc); > } Is the FileFsAttributeInformation known at this stage? If so, you may wish to check for the FILE_FILE_COMPRESSION capability, and avoid the request dispatch if absent. IIRC, Explorer hides the compression check-checkbox if the capability is missing.