On Jan 16, 2007  21:03 +0900, [EMAIL PROTECTED] wrote:
> 1. Add new ioctl(EXT4_IOC_DEFRAG) which returns the first physical
>    block number of the specified file.  With this ioctl, a command
>    gets the specified directory's.

Maybe I don't understand, but how is this different from the long-time
FIBMAP ioctl?

> 2. The new entry "goal" is added on ext4_ext_defrag_data structure
>    which is passed to existing ioctl(EXT4_IOC_DEFRAG)
>    as the argument.  The kernel starts searching the free blocks
>    from "goal".  The command passes the physical block number
>    gotten in the above step(1) to the ioctl.
> 
> struct ext4_ext_defrag_data {
>         loff_t start_offset; /* start offset to defrag in byte */
>         loff_t defrag_size;  /* size of defrag in bytes */
>       ext4_fsblk_t goal;   /* block offset for allocation */
> };

Two things of note:
- presumably the start_offset and defrag_size should be multiples of the
  filesystem blocksize?  If they are not, is it an error or are they
  adjusted to cover whole blocks?
- in previous defrag discussions (i.e. XFS defrag), it was desirable to
  allow specifying different types of goals (e.g. hard, soft, kernel picks).
  We may as well have a structure that allows these to be specified, instead
  of having to change the interface afterward.
  
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to