The patch titled Subject: ocfs2: solve a problem of crossing the boundary in updating backups has been added to the -mm tree. Its filename is ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: jiangyiwen <jiangyiwen@xxxxxxxxxx> Subject: ocfs2: solve a problem of crossing the boundary in updating backups In update_backups() there exists a problem of crossing the boundary as follows: we assume that lun will be resized to 1TB(cluster_size is 32kb), it will include 0~33554431 cluster, in update_backups func, it will backup super block in location of 1TB which is the 33554432th cluster, so the phenomenon of crossing the boundary happens. Signed-off-by: Yiwen Jiang <jiangyiwen@xxxxxxxxxx> Cc: Joseph Qi <joseph.qi@xxxxxxxxxx> Cc: Xue jiufei <xuejiufei@xxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ocfs2/resize.c~ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups fs/ocfs2/resize.c --- a/fs/ocfs2/resize.c~ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups +++ a/fs/ocfs2/resize.c @@ -187,7 +187,7 @@ static int update_backups(struct inode * for (i = 0; i < OCFS2_MAX_BACKUP_SUPERBLOCKS; i++) { blkno = ocfs2_backup_super_blkno(inode->i_sb, i); cluster = ocfs2_blocks_to_clusters(inode->i_sb, blkno); - if (cluster > clusters) + if (cluster >= clusters) break; ret = ocfs2_read_blocks_sync(osb, blkno, 1, &backup); _ Patches currently in -mm which might be from jiangyiwen@xxxxxxxxxx are ocfs2-fill-in-the-unused-portion-of-the-block-with-zeros-by-dio_zero_block.patch ocfs2-avoid-occurring-deadlock-by-changing-ocfs2_wq-from-global-to-local.patch ocfs2-solve-a-problem-of-crossing-the-boundary-in-updating-backups.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html