Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2: Check heartbeat mode for kernel stacks only
Ocfs2/refcounttree: Fix a bug for refcounttree to writeback clusters in a right number.
ocfs2: Fix estimate of necessary credits for mkdir

+28 -13
+3 -3
fs/ocfs2/journal.h
··· 405 405 ocfs2_quota_trans_credits(sb); 406 406 } 407 407 408 - /* data block for new dir/symlink, 2 for bitmap updates (bitmap fe + 409 - * bitmap block for the new bit) dx_root update for free list */ 410 - #define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + 2 + 1) 408 + /* data block for new dir/symlink, allocation of directory block, dx_root 409 + * update for free list */ 410 + #define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + OCFS2_SUBALLOC_ALLOC + 1) 411 411 412 412 static inline int ocfs2_add_dir_index_credits(struct super_block *sb) 413 413 {
+5 -2
fs/ocfs2/refcounttree.c
··· 3228 3228 u32 num_clusters, unsigned int e_flags) 3229 3229 { 3230 3230 int ret, delete, index, credits = 0; 3231 - u32 new_bit, new_len; 3231 + u32 new_bit, new_len, orig_num_clusters; 3232 3232 unsigned int set_len; 3233 3233 struct ocfs2_super *osb = OCFS2_SB(sb); 3234 3234 handle_t *handle; ··· 3260 3260 mlog_errno(ret); 3261 3261 goto out; 3262 3262 } 3263 + 3264 + orig_num_clusters = num_clusters; 3263 3265 3264 3266 while (num_clusters) { 3265 3267 ret = ocfs2_get_refcount_rec(ref_ci, context->ref_root_bh, ··· 3350 3348 * in write-back mode. 3351 3349 */ 3352 3350 if (context->get_clusters == ocfs2_di_get_clusters) { 3353 - ret = ocfs2_cow_sync_writeback(sb, context, cpos, num_clusters); 3351 + ret = ocfs2_cow_sync_writeback(sb, context, cpos, 3352 + orig_num_clusters); 3354 3353 if (ret) 3355 3354 mlog_errno(ret); 3356 3355 }
+20 -8
fs/ocfs2/super.c
··· 1316 1316 struct mount_options *mopt, 1317 1317 int is_remount) 1318 1318 { 1319 - int status; 1319 + int status, user_stack = 0; 1320 1320 char *p; 1321 1321 u32 tmp; 1322 1322 ··· 1459 1459 memcpy(mopt->cluster_stack, args[0].from, 1460 1460 OCFS2_STACK_LABEL_LEN); 1461 1461 mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0'; 1462 + /* 1463 + * Open code the memcmp here as we don't have 1464 + * an osb to pass to 1465 + * ocfs2_userspace_stack(). 1466 + */ 1467 + if (memcmp(mopt->cluster_stack, 1468 + OCFS2_CLASSIC_CLUSTER_STACK, 1469 + OCFS2_STACK_LABEL_LEN)) 1470 + user_stack = 1; 1462 1471 break; 1463 1472 case Opt_inode64: 1464 1473 mopt->mount_opt |= OCFS2_MOUNT_INODE64; ··· 1523 1514 } 1524 1515 } 1525 1516 1526 - /* Ensure only one heartbeat mode */ 1527 - tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL | OCFS2_MOUNT_HB_GLOBAL | 1528 - OCFS2_MOUNT_HB_NONE); 1529 - if (hweight32(tmp) != 1) { 1530 - mlog(ML_ERROR, "Invalid heartbeat mount options\n"); 1531 - status = 0; 1532 - goto bail; 1517 + if (user_stack == 0) { 1518 + /* Ensure only one heartbeat mode */ 1519 + tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL | 1520 + OCFS2_MOUNT_HB_GLOBAL | 1521 + OCFS2_MOUNT_HB_NONE); 1522 + if (hweight32(tmp) != 1) { 1523 + mlog(ML_ERROR, "Invalid heartbeat mount options\n"); 1524 + status = 0; 1525 + goto bail; 1526 + } 1533 1527 } 1534 1528 1535 1529 status = 1;