From: Maxim P. <mpa...@pa...> - 2014-02-13 16:45:30
|
On 02/13/2014 06:28 PM, Miklos Szeredi wrote: > On Thu, Feb 13, 2014 at 2:59 PM, Maxim Patlasov <mpa...@pa...> wrote: >> On 02/13/2014 04:35 PM, Miklos Szeredi wrote: >>> On Thu, Feb 13, 2014 at 12:44 PM, Maxim Patlasov >>> <mpa...@pa...> wrote: >>> >>> I intentionally took out writeback_enable from both userspace and >>> kernel because I think it doesn't add any value. >> >> Hm... I can still see: >> >> >>> if (arg->flags & FUSE_WRITEBACK_CACHE && >>> fc->flags & FUSE_ALLOW_WBCACHE) >>> fc->writeback_cache = 1; >> >> in fs/fuse/inode.c from writeback_cache branch. Where did you take it out in >> kernel? > Then you are looking at a different branch :) > > The one I'm looking at (and is on git.kernel.org) has head at b2ec2778df9d Sorry, my fault. I used a slightly outdated version of the branch :( After updating to b2ec2778df9d an issue showed up: # dd if=/dev/zero of=/fuse/foo bs=4k count=1 1+0 records in 1+0 records out 4096 bytes (4.1 kB) copied, 0.00013326 s, 30.7 MB/s # dd if=/dev/zero of=/fuse/foo bs=2k count=1 dd: writing `/fuse/foo': Bad file descriptor 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.000249716 s, 0.0 kB/s I'll investigate, fix it, re-run tests and let you know about results. Thanks, Maxim > >>> What's the reason >>> you added this option in the first place? > [...] > >> So it's up to sysad to allow or disallow the feature for unprivileged >> mounts. > Okay, but why is writeback cache unsafe? AFAICS it is safe, in which > case protecting it isn't needed. > > And anyway ALLOW_WBCACHE thing didn't check capabilities, and even if > it did, that wouldn't have worked because mount(2) gets called with > elevated privs... We can hack around that if needed, but I'd rather > just allow this without sysadmin control if possible. > > Thanks, > Miklos > > |