[Top] [All Lists]

Re: [PATCH] Introduce SEEK_DATA/SEEK_HOLE support v9

To: jeff.liu@xxxxxxxxxx
Subject: Re: [PATCH] Introduce SEEK_DATA/SEEK_HOLE support v9
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Thu, 10 May 2012 14:51:15 -0500
Cc: xfs@xxxxxxxxxxx, Ben Myers <bpm@xxxxxxx>
In-reply-to: <4FABC2AD.2030609@xxxxxxxxxx>
References: <4FABC2AD.2030609@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 05/10/12 08:29, Jeff Liu wrote:

This is the revised patch according to Mark's comments.
Is it possible to get it to accept if there are no other issues,
so that I can continue to work on the unwritten part based on that.


Signed-off-by: Jie Liu<jeff.liu@xxxxxxxxxx>


+STATIC loff_t
+       struct file             *file,
+       loff_t                  start,
+       u32                     type)
+       struct inode            *inode = file->f_mapping->host;
+       struct xfs_inode        *ip = XFS_I(inode);
+       struct xfs_mount        *mp = ip->i_mount;
+       loff_t                  uninitialized_var(offset);
+       loff_t                  holeoff;
+       xfs_fsize_t             isize;
+       xfs_fileoff_t           fsbno;
+       uint                    lock;
+       int                     error;
+       if (XFS_FORCED_SHUTDOWN(mp))
+               return -XFS_ERROR(EIO);

I think xfs_bmapi_read() returns just a XFS_ERROR(EIO), not negative.
Ben can fix up if you agree.

Other than that it is a great feature to in XFS.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>