From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:51703 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726669AbeI0Opg (ORCPT ); Thu, 27 Sep 2018 10:45:36 -0400 From: Nikolaus Rath To: Miklos Szeredi Cc: fuse-devel , Miklos Szeredi , linux-fsdevel Subject: Re: [fuse-devel] [fuse] How to trigger writeback? References: <87zhw7s4qb.fsf@thinkpad.rath.org> <8736tyrncj.fsf@thinkpad.rath.org> Date: Thu, 27 Sep 2018 09:28:29 +0100 In-Reply-To: (Miklos Szeredi's message of "Tue, 25 Sep 2018 10:48:37 +0200") Message-ID: <87zhw3qr82.fsf@thinkpad.rath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sep 25 2018, Miklos Szeredi wrote: > On Tue, Sep 25, 2018 at 10:30 AM, Nikolaus Rath wrote: >> On Sep 24 2018, Miklos Szeredi wrote: >>> On Mon, Sep 24, 2018 at 10:02 AM, Nikolaus Rath wro= te: >>>> Hi, >>>> >>>> How do I trigger writeback from a (writeback-cache enabled) FUSE >>>> filesystem? >>> >>> No way, currently (well, triggering fsync(2)/fdatasync(2) on the >>> filesystem would work, but such recursion is considered highly >>> hackish). >> >> >> You mean sync(2)/syncfs(2), not fsync(), right? Unless my manpages are >> out of date, fsync() only works on a specific inode. > > I would've thought you only need writeback of a specific inode for reflin= k, no? Aeh, yeah, I did not mention that. Since I couldn't implement real reflink support but have to go through xattrs, my "reflink" also supports reflinking entire directory trees. I guess I could still issue a bunch of fsyncs(), but I think syncfs() is nicer (I can even move it into the client program that sets the magic xattr so that the filesystem does not call into itself). Best, -Nikolaus --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB