From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hr2.samba.org ([144.76.82.148]:52422 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbeEJSsV (ORCPT ); Thu, 10 May 2018 14:48:21 -0400 Date: Thu, 10 May 2018 11:48:17 -0700 From: Jeremy Allison To: Pavel Shilovsky Cc: Steve French , linux-fsdevel , CIFS , samba-technical Subject: Re: [PATCH] cifs/smb3: directory sync should not return an error Message-ID: <20180510184817.GG23039@jra3> Reply-To: Jeremy Allison References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, May 10, 2018 at 10:11:43AM -0700, Pavel Shilovsky via samba-technical wrote: > 2018-05-10 9:04 GMT-07:00 Steve French via samba-technical > : > > As with NFS, which ignores sync on directory handles, > > fsync on a directory handle is a noop for CIFS/SMB3. > > Do not return an error on it. It breaks some database > > apps otherwise. > > Reviewed-by: Pavel Shilovsky NAK on this patch. It's due to a specific Samba server bug, which I've just fixed. Look at the man page for fsync() on directory handles - in SMB2+ as well this is a useful thing for an application to do. The broken Samba server returns NT_STATUS_ACCESS_DENIED here. What you need to do is test the popular servers (Windows, NetApp, EMC, Samba, OSX) and see which of them are broken (not Windows obviously) and if so what errors they return. Best case scenario it's just Samba that was broken, so check for the specific NT_STATUS_ACCESS_DENIED error and ignore, otherwise return the error to the caller - they *NEED* it :-). Jeremy.