Re: [PATCH] Quota fix 3 - quota file corruption

From: Andrew Morton (akpm_at_osdl.org)
Date: 05/17/04

  • Next message: Steven Cole: "Re: 1352 NUL bytes at the end of a page? (was Re: Assertion `s && s->tree' failed: The saga continues.)"
    Date:	Mon, 17 May 2004 13:57:09 -0700
    To: Jan Kara <jack@ucw.cz>
    
    

    Jan Kara <jack@ucw.cz> wrote:
    >
    > + memset(&empty, 0, sizeof(struct v2_disk_dqblk));
    > + if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
    > + ddquot.dqb_itime = cpu_to_le64(1);

    hm, OK.

    Comparing structures for equality might not work right if the compiler
    added internal padding. However in this case the structure is six u32's
    followed by a couple of u64's so it will work out right. And it's an
    on-disk thing so it won't be changing in a hurry.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Steven Cole: "Re: 1352 NUL bytes at the end of a page? (was Re: Assertion `s && s->tree' failed: The saga continues.)"