From: Edward Shishkin <edward.shishkin@gmail.com>
To: Pavel Machek <pavel@ucw.cz>,
Metztli Information Technology <jose.r.r@metztli.com>
Cc: reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] Reiser5: Selective File Migration - User Interface
Date: Sat, 17 Oct 2020 17:53:05 +0200 [thread overview]
Message-ID: <fe9dafa8-0fef-7046-fea7-f2344adc2ee1@gmail.com> (raw)
In-Reply-To: <20201004095922.GC1104@bug>
On 10/04/2020 11:59 AM, Pavel Machek wrote:
> Hi!
>
>>> In particular, using this functionality, user is able to push out
>>> "hot" files on any high-performance device (e.g. proxy device) and pin
>>> them there.
>
> What permissions are normally required for file migration?
Hi Pavel,
I guess, admin ones.
With such operation it is possible to organize an attack on a
collectively shared volume by clogging some its brick. So that other
users, who rely on regular distribution (provided by per-volume
distribution table) will get "no space left on device", while other
bricks contain a lot of free space..
>
>>> COMMENT. After ioctl successful completion the file is not necessarily
>>> written to the target device! To make sure of it, call fsync(2) after
>>> successful ioctl completion, or open the file with O_SYNC flag before
>>> migration.
>
> Ok.
>
>>> COMMENT. File migration is a volume operation (like adding, removing a device to/from
>>> a logical volumes), and all volume operations are serialized. So, any attempt to
>>> migrate a file, while performing other operation on that volume will fail. If some
>>> file migration procedure fails (with EBUSY, or other errors), or was interrupted by
>>> user, then it should be repeated in the current mount session. File migration
>>> procedures interrupted by system crash, hared reset, etc) should be repeated in the
>>> next mount sessions.
>
> Dunno. Returning -EBUSY is kind of "interesting" there. I'd expect kernel to queue
> the callers, because userland can't really do that easily.
>
You are right. The current solution is temporary. Actually, we don't
need to lock the whole volume in order to migrate a file (anyway, the
file migration procedure takes an exclusive access to the file).
User-defined migration of individual files should be serialized with
brick removal. So it will be even per-brick lock rather than per-volume
lock.. I think, that it should be a rw-semaphore. Brick removal
procedure will take a write lock (with possible waiting) and
user-defined migration will try to take a read lock. If busy, then
return error (brick is under removal == doesn't exist for user).
Thanks,
Edward.
next prev parent reply other threads:[~2020-10-17 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 20:52 [ANNOUNCE] Reiser5: Selective File Migration - User Interface Metztli Information Technology
2020-08-26 21:13 ` Edward Shishkin
2020-10-04 9:59 ` Pavel Machek
2020-10-17 15:53 ` Edward Shishkin [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-30 7:04 Metztli Information Technology
2020-08-27 21:53 Metztli Information Technology
2020-08-27 23:50 ` Edward Shishkin
2020-08-29 9:54 ` Edward Shishkin
2020-07-05 11:12 Edward Shishkin
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=fe9dafa8-0fef-7046-fea7-f2344adc2ee1@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=jose.r.r@metztli.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=reiserfs-devel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).