Re: [PATCH 2/5] xfs: defer AIO/DIO completions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 14, 2011 at 06:24:14PM -0400, Christoph Hellwig wrote:
> We really shouldn't complete AIO or DIO requests until we have finished
> the unwritten extent conversion and size update.  This means fsync never
> has to pick up any ioends as all work has been completed when signalling
> I/O completion.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

I don't really like the field abuse. pahole tells me:

struct xfs_ioend {
        struct xfs_ioend *         io_list;              /*     0     8 */
        unsigned int               io_type;              /*     8     4 */
        int                        io_error;             /*    12     4 */
        atomic_t                   io_remaining;         /*    16     4 */

        /* XXX 4 bytes hole, try to pack */

        struct inode *             io_inode;             /*    24     8 */
        struct buffer_head *       io_buffer_head;       /*    32     8 */
        struct buffer_head *       io_buffer_tail;       /*    40     8 */
        size_t                     io_size;              /*    48     8 */
        xfs_off_t                  io_offset;            /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        struct work_struct         io_work;              /*    64    32 */
        struct kiocb *             io_iocb;              /*    96     8 */
        int                        io_result;            /*   104     4 */

There's a 4 byte hole in the xfs_ioend structure where you could put
a flags field to communicate this and not grow the structure....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux