Commit caef5e31 authored by Oleg Drokin's avatar Oleg Drokin

tail_conversion.c, namei.c:

  fix reiserfs tail and direntry alignment bug on filesystems converted from 3.5.x to 3.6.x.
parent ca980f75
......@@ -463,7 +463,7 @@ static int reiserfs_add_entry (struct reiserfs_transaction_handle *th, struct in
} else
buffer = small_buf;
paste_size = (old_format_only (dir->i_sb)) ? (DEH_SIZE + namelen) : buflen;
paste_size = (get_inode_sd_version (dir) == STAT_DATA_V1) ? (DEH_SIZE + namelen) : buflen;
/* fill buffer : directory entry head, name[, dir objectid | , stat data | ,stat data, dir objectid ] */
deh = (struct reiserfs_de_head *)buffer;
......
......@@ -214,7 +214,7 @@ int indirect2direct (struct reiserfs_transaction_handle *th,
copy_item_head (&s_ih, PATH_PITEM_HEAD(p_s_path));
tail_len = (n_new_file_size & (n_block_size - 1));
if (!old_format_only (p_s_sb))
if (get_inode_sd_version (p_s_inode) == STAT_DATA_V2)
round_tail_len = ROUND_UP (tail_len);
else
round_tail_len = tail_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment