From: asmadeus@codewreck.org
To: Eric Van Hensbergen <evanhensbergen@icloud.com>
Cc: v9fs-developer@lists.sourceforge.net, rminnich@gmail.com,
lucho@ionkov.net, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux_oss@crudebyte.com
Subject: Re: [PATCH 2/6] Don't assume UID 0 attach
Date: Sun, 18 Dec 2022 09:07:52 +0900 [thread overview]
Message-ID: <Y55Z2DwZgRG+9zW3@codewreck.org> (raw)
In-Reply-To: <20221217185210.1431478-3-evanhensbergen@icloud.com>
Eric Van Hensbergen wrote on Sat, Dec 17, 2022 at 06:52:06PM +0000:
> The writeback_fid fallback code assumes a root uid fallback which
> breaks many server configurations (which don't run as root). This
> patch switches to generic lookup which will follow argument
> guidence on access modes and default ids to use on failure.
Unfortunately this one will break writes to a file created as 400 I
think
That's the main reason we have this writeback fid afaik -- there are
cases where the user should be able to write to the file, but a plain
open/write won't work... I can't think of anything else than open 400
right now though
I'm sure there's an xfs_io command and xfstest for that, but for now:
python3 -c 'import os; f = os.open("testfile", os.O_CREAT + os.O_RDWR, 0o400); os.write(f, b"ok\n")'
iirc ganesha running as non-root just ignores root requests and opens as
current user-- this won't work for this particular case, but might be
good enough for you... With that said:
> There is a deeper underlying problem with writeback_fids in that
> this fallback is too standard and not an exception due to the way
> writeback mode works in the current implementation. Subsequent
> patches will try to associate writeback fids from the original user
> either by flushing on close or by holding onto fid until writeback
> completes.
If we can address this problem though I agree we should stop using
wrieback fids as much as we do.
Now fids are refcounted, I think we could just use the normal fid as
writeback fid (getting a ref), and the regular close will not clunk it
so delayed IOs will pass.
Worth a try?
--
Dominique
next prev parent reply other threads:[~2022-12-18 0:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 18:52 [PATCH] Improve 9p performance for read operations Eric Van Hensbergen
2022-12-17 18:52 ` [PATCH 1/6] Adjust maximum MSIZE to account for p9 header Eric Van Hensbergen
2022-12-18 14:49 ` Christian Schoenebeck
[not found] ` <CAFkjPTmoQvzaSsSOAgM9_0+knudWsdi8=TnMOTXZj05hT6tneQ@mail.gmail.com>
[not found] ` <51FD8D16-4070-4DCF-AEB5-11640A82762E@icloud.com>
[not found] ` <CAP6exY+BF+1fjjUKX20vvbTZXiZ2gxUN3zc8+ZaHTY-aX6fRFQ@mail.gmail.com>
2022-12-18 19:46 ` asmadeus
2022-12-18 19:52 ` evanhensbergen
2022-12-17 18:52 ` [PATCH 2/6] Don't assume UID 0 attach Eric Van Hensbergen
2022-12-18 0:07 ` asmadeus [this message]
2022-12-18 1:05 ` evanhensbergen
[not found] ` <864E1007-CBCF-40C7-B438-A76C3065AFC9@icloud.com>
2022-12-18 19:49 ` [V9fs-developer] " asmadeus
2022-12-18 19:59 ` evanhensbergen
2022-12-17 18:52 ` [PATCH 3/6] Expand setup of writeback cache to all levels Eric Van Hensbergen
2022-12-17 18:52 ` [PATCH 4/6] Consolidate file operations and add readahead and writeback Eric Van Hensbergen
2022-12-17 20:49 ` kernel test robot
2022-12-17 21:50 ` kernel test robot
2022-12-17 18:52 ` [PATCH 5/6] Remove unnecessary superblock flags Eric Van Hensbergen
2022-12-17 18:52 ` [PATCH 6/6] allow disable of xattr support on mount Eric Van Hensbergen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y55Z2DwZgRG+9zW3@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=evanhensbergen@icloud.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=rminnich@gmail.com \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.