lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: add FS_IOC_UNRESVSP/FS_IOC_UNRESVSP64 ioctls
On Tue, Sep 20, 2011 at 06:20:00PM +0400, Dmitry Monakhov wrote:
> Add ioctl interface for FALLOC_FL_PUNCH_HOLE. Ioctls are synonyms of
> XFS_IOC_UNRESVSP ioctls. Yes probably one can say than we already have
> a syscall intercase for fallocate, and in general this is right but:
> - We already have FS_IOC_RESVSP (synonym of XFS_IOC_RESVSP)
> and it heavily used. So actually this ioctl is not a
> brand new one. It just makes RSV/URSV interface complete.

Those exist because filesystems copied them from XFS before
fallocate() was implemented. They are considered "legacy" interfaces
and are only kept for compatibility with old applications that were
using the XFS interfaces before fallocate came along.

> - There are miliones lines of userspace code written
> that can be reused for generic linux filesystems without
> modification. SGI has open sourced many good stuff which are
> under rapid development by linux community. For example
> kernel.org/scm/fs/xfs/xfstests-dev.git currently is one of
> most used fs-regression testing suite.

Yes, but as it xfstests is currently maintained, the correct thing
to do is to extend it to use fallocate() interfaces so they get
tested. We've already done this for tools the test suite uses like
fsx, and there are new fallocate based hole punching tests that
have been added recently.

IMO, no new functionality should use [X]FS_IOC_*RESVSP ioctl
interfaces, and code that currently uses them should be ported to
use fallocate.

> In other words i've added only 30lines of code, and get great
> many good tools working for me, IMHO it is good deal.

Such as? I can't think of many tools in the linux ecosystem other
than XFS specific utilities that actually support hole
punching through this interface.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2011-09-21 00:49    [W:0.030 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site