Displaying 10 results from an estimated 10 matches for "ocfs2_zero_new_buff".
2023 Mar 02
1
[PATCH] ocfs2: Fix data corruption after failed write
...fdce3 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 20
2
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 5.10-stable tree
...fdce3 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 20
1
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 4.19-stable tree
...fdce3 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.10-stable tree
...nsertions(+), 2 deletions(-)
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1981,11 +1981,25 @@ int ocfs2_write_end_nolock(struct addres
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.4-stable tree
...nsertions(+), 2 deletions(-)
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1990,11 +1990,25 @@ int ocfs2_write_end_nolock(struct addres
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 03
0
+ ocfs2-fix-data-corruption-after-failed-write.patch added to mm-hotfixes-unstable branch
...aops.c~ocfs2-fix-data-corruption-after-failed-write
+++ a/fs/ocfs2/aops.c
@@ -1977,11 +1977,26 @@ int ocfs2_write_end_nolock(struct addres
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2023 Mar 21
1
[PATCH] ocfs2: fix data corruption after failed write
...f7f48 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2003,11 +2003,25 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
}
if (unlikely(copied < len) && wc->w_target_page) {
+ loff_t new_isize;
+
if (!PageUptodate(wc->w_target_page))
copied = 0;
- ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
- start+len);
+ new_isize = max_t(loff_t, i_size_read(inode), pos + copied);
+ if (new_isize > page_offset(wc->w_target_page))
+ ocfs2_zero_new_buffers(wc->w_target_page, start+copied,
+ start+len);
+ else {
+ /*
+ * Whe...
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...M;
+ }
wc->w_cpos = pos >> osb->s_clustersize_bits;
cend = (pos + len - 1) >> osb->s_clustersize_bits;
@@ -997,6 +1074,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
*wcp = wc;
+ mlog_exit(0);
return 0;
}
@@ -1010,6 +1088,8 @@ static void ocfs2_zero_new_buffers(struct page *page, unsigned from, unsigned to
unsigned int block_start, block_end;
struct buffer_head *head, *bh;
+ mlog(0, "(%lu, %u, %u)\n", page->index, from, to);
+
BUG_ON(!PageLocked(page));
if (!page_has_buffers(page))
return;
@@ -1054,6 +1134,9 @@ static void ocf...
2009 Jul 21
1
(no subject)
...M;
+ }
wc->w_cpos = pos >> osb->s_clustersize_bits;
cend = (pos + len - 1) >> osb->s_clustersize_bits;
@@ -997,6 +1080,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
*wcp = wc;
+ mlog_exit(0);
return 0;
}
@@ -1010,6 +1094,8 @@ static void ocfs2_zero_new_buffers(struct page *page, unsigned from, unsigned to
unsigned int block_start, block_end;
struct buffer_head *head, *bh;
+ mlog(0, "(%lu, %u, %u)\n", page->index, from, to);
+
BUG_ON(!PageLocked(page));
if (!page_has_buffers(page))
return;
@@ -1054,6 +1140,10 @@ static void oc...
2009 Jul 21
1
[PATCH 1/1] ocfs2: adds mlogs to aops.c -V2
...M;
+ }
wc->w_cpos = pos >> osb->s_clustersize_bits;
cend = (pos + len - 1) >> osb->s_clustersize_bits;
@@ -997,6 +1080,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
*wcp = wc;
+ mlog_exit(0);
return 0;
}
@@ -1010,6 +1094,8 @@ static void ocfs2_zero_new_buffers(struct page *page, unsigned from, unsigned to
unsigned int block_start, block_end;
struct buffer_head *head, *bh;
+ mlog(0, "(%lu, %u, %u)\n", page->index, from, to);
+
BUG_ON(!PageLocked(page));
if (!page_has_buffers(page))
return;
@@ -1054,6 +1140,10 @@ static void oc...