|
@@ -37,6 +37,7 @@ static unsigned long
|
|
nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
|
|
nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
|
|
{
|
|
{
|
|
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
|
|
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
|
|
|
|
+
|
|
do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
|
|
do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
|
|
return (unsigned long)tcno;
|
|
return (unsigned long)tcno;
|
|
}
|
|
}
|
|
@@ -46,6 +47,7 @@ static unsigned long
|
|
nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
|
|
nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
|
|
{
|
|
{
|
|
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
|
|
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
|
|
|
|
+
|
|
return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
|
|
return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
|
|
}
|
|
}
|
|
|
|
|