Re: [PATCH] [RFC] xfs: fix inode fork extent count overflow

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

 



On Thu, Sep 12, 2019 at 11:08:38AM +1000, Dave Chinner wrote:
> On Wed, Sep 11, 2019 at 03:55:51AM -0700, Christoph Hellwig wrote:
> > ... and there went my hopes to eventually squeeze xfs_ifork into
> > a single 64-byte cacheline.  But the analys looks sensible.
> 
> Not sure what the issue is here:
> 
> struct xfs_ifork {
>         int64_t                    if_bytes;             /*     0     8 */
>         struct xfs_btree_block *   if_broot;             /*     8     8 */
>         unsigned int               if_seq;               /*    16     4 */
>         int                        if_height;            /*    20     4 */
>         union {
>                 void *             if_root;              /*    24     8 */
>                 char *             if_data;              /*    24     8 */
>         } if_u1;                                         /*    24     8 */
>         short int                  if_broot_bytes;       /*    32     2 */
>         unsigned char              if_flags;             /*    34     1 */
> 
>         /* size: 40, cachelines: 1, members: 7 */
>         /* padding: 5 */
>         /* last cacheline: 40 bytes */
> };
> 
> it's already well inside a 64-byte single cacheline, even with a
> 64bit if_bytes. Yes, I've just pushed it from 32 to 40 bytes, but
> but if that is a problem we could pack some things more tightly...

Ok, I misremembered.  But before it fit into half a cacheline and nicely
aligned slab, and now it doesn't.  Not really as an argument against
the patch because it is clearly needed..



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux