public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* Question about EXT4_IOC_MOVE_EXT
@ 2014-07-20 10:16 Timofey Titovets
  2014-07-21 10:45 ` Dmitry Monakhov
  0 siblings, 1 reply; 3+ messages in thread
From: Timofey Titovets @ 2014-07-20 10:16 UTC (permalink / raw)
  To: linux-ext4

Good time of day, i am working for optimization of readahead in
systemd and now, i try to implement EXT4_IOC_MOVE_EXT ioctl. I have
several questions:

1. In fs every file has a file descriptor, file descriptor is a
integer number. Can we say what, by file descriptor, we can determine
order of files where he places on a disk?
As example: a - 5; b - 54; c - 31; d - 20;
This mean what files place order like:
start of disk -> a -> d ->  c -> b -> end of disk
and if i swap files by EXT4_IOC_MOVE_EXT, i can reorder it to:
start of disk -> a -> b -> c -> d -> end of disk
This is true?

2. Can i pack files in custom order on a disk? (i have order of
accessing files on a disk, and i want place him in accessing order
like e4rat project do)
If yes, how? May be we have ioctl call or e2fsprogs has realisation of this?
( e4rat as i understand by looking source, patch kernel, to get
features of files reorder)

3. In
struct move_extent {
    __s32 reserved;    /* original file descriptor */
    __u32 donor_fd;    /* donor file descriptor */
    __u64 orig_start;  /* logical start offset in block for orig */
    __u64 donor_start; /* logical start offset in block for donor */
    __u64 len;         /* block length to be moved */
    __u64 moved_len;   /* moved block length */
};
Can i ignore (not set) orig_start, donor_start, len, moved_len?
What happen if i set it by zeros?
if i move original file descriptor to file descriptor with zero size
of file, what happen? or in begger file donor then original?

-----
Best regards,
Timofey.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-21 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-20 10:16 Question about EXT4_IOC_MOVE_EXT Timofey Titovets
2014-07-21 10:45 ` Dmitry Monakhov
2014-07-21 15:24   ` Timofey Titovets

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox