Displaying 10 results from an estimated 10 matches for "vict_bit".
2023 Feb 17
1
[PATCH] ocfs2: fix non-auto defrag path not working issue
This commit fixes three issues on non-auto defrag path (defragfs.ocfs2
doesn't set OCFS2_MOVE_EXT_FL_AUTO_DEFRAG on range.me_flags):
- For ocfs2_find_victim_alloc_group(), old code forgot enlarge bitmap
range for global_bitmap case. Old code could generate negative
vict_bit.
- For ocfs2_probe_alloc_group(), old code forgot back off move_len when
finding enough bitmap space. Old code has possibility to make data
corruption.
- For ocfs2_ioctl_move_extents(), this func should set me_threshold for
both auto & non-auto path. Without setting me_threshold,
ocfs2_...
2023 Feb 20
1
[PATCH v2] ocfs2: fix non-auto defrag path not working issue
...int ocfs2_find_victim_alloc_group(struct inode *inode,
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(struct inode *inode, struct buffer_head *bh,
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@...
2023 Feb 20
1
[PATCH v2] ocfs2: fix non-auto defrag path not working issue
...inode *inode,
> bg = (struct ocfs2_group_desc *)gd_bh->b_data;
>
> if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
> - le16_to_cpu(bg->bg_bits))) {
> + (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
>
> *ret_bh = gd_bh;
> *vict_bit = (vict_blkno - blkno) >>
> @@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(struct inode *inode, struct buffer_head *bh,
> last_free_bits++;
>
> if (last_free_bits == move_len) {
> + i -= move_len;
> *goal_bit = i;
> *phys_cpos = base_cpos + i;...
2023 Feb 28
0
[merged mm-hotfixes-stable] ocfs2-fix-non-auto-defrag-path-not-working-issue.patch removed from -mm tree
...4,7 +434,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Mar 06
0
Patch "ocfs2: fix non-auto defrag path not working issue" has been added to the 6.2-stable tree
...4,7 +434,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Mar 06
0
Patch "ocfs2: fix non-auto defrag path not working issue" has been added to the 6.1-stable tree
...4,7 +434,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Mar 06
0
Patch "ocfs2: fix non-auto defrag path not working issue" has been added to the 5.15-stable tree
...4,7 +434,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Mar 06
0
Patch "ocfs2: fix non-auto defrag path not working issue" has been added to the 5.4-stable tree
...6,7 +436,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -551,6 +551,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1022,18 +1023,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Mar 06
0
Patch "ocfs2: fix non-auto defrag path not working issue" has been added to the 4.19-stable tree
...4,7 +444,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -559,6 +559,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1030,18 +1031,19 @@ int ocfs2_ioctl_move_extents(struct file...
2023 Feb 23
0
+ ocfs2-fix-non-auto-defrag-path-not-working-issue.patch added to mm-hotfixes-unstable branch
...4,7 +434,7 @@ static int ocfs2_find_victim_alloc_group
bg = (struct ocfs2_group_desc *)gd_bh->b_data;
if (vict_blkno < (le64_to_cpu(bg->bg_blkno) +
- le16_to_cpu(bg->bg_bits))) {
+ (le16_to_cpu(bg->bg_bits) << bits_per_unit))) {
*ret_bh = gd_bh;
*vict_bit = (vict_blkno - blkno) >>
@@ -549,6 +549,7 @@ static void ocfs2_probe_alloc_group(stru
last_free_bits++;
if (last_free_bits == move_len) {
+ i -= move_len;
*goal_bit = i;
*phys_cpos = base_cpos + i;
break;
@@ -1020,18 +1021,19 @@ int ocfs2_ioctl_move_extents(struct file...