From: adilger Date: Fri, 14 Jun 2002 07:26:20 +0000 (+0000) Subject: Probable fix for storing 64-bit objids on the MDS for ext3. Probably needs X-Git-Tag: 0.4.2~153 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=49cb1a170589bba342b5476012fae02a5e1dba88;p=fs%2Flustre-release.git Probable fix for storing 64-bit objids on the MDS for ext3. Probably needs to be revised to fit the new LOV format (if there is enough space for it). --- diff --git a/lustre/mds/mds_ext3.c b/lustre/mds/mds_ext3.c index 26c385e..fa1223b8a 100644 --- a/lustre/mds/mds_ext3.c +++ b/lustre/mds/mds_ext3.c @@ -123,13 +123,13 @@ static int mds_ext3_setattr(struct dentry *dentry, void *handle, */ static int mds_ext3_set_objid(struct inode *inode, void *handle, obd_id id) { - (__u64)EXT3_I(inode)->i_data[0] = cpu_to_le64(id); + *((__u64 *)EXT3_I(inode)->i_data) = cpu_to_le64(id); return 0; } static int mds_ext3_get_objid(struct inode *inode, obd_id *id) { - *id = le64_to_cpu(EXT3_I(inode)->i_data[0]); + *id = le64_to_cpu(*((__u64 *)EXT3_I(inode)->i_data)); return 0; } @@ -193,7 +193,6 @@ static void mds_ext3_callback_status(void *jcb, int error) mcb->cb_mds->mds_last_committed = mcb->cb_last_rcvd; kmem_cache_free(jcb_cache, mcb); - //OBD_FREE(mcb, sizeof(*mcb)); --jcb_cache_count; } @@ -208,7 +207,6 @@ static int mds_ext3_set_last_rcvd(struct mds_obd *mds, void *handle) { struct mds_cb_data *mcb; - //OBD_ALLOC(mcb, sizeof(*mcb)); mcb = kmem_cache_alloc(jcb_cache, GFP_NOFS); if (!mcb) RETURN(-ENOMEM);