Displaying 20 results from an estimated 22 matches for "ocfs2_write_end_nolock".
2023 Mar 02
1
[PATCH] ocfs2: Fix data corruption after failed write
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this
page before write succeeds and expands i_size, page gets into
inconsistent state where page dirty bit is clear but buffer dirty bits
stay set resulting in page data never getting w...
2013 Jun 19
1
ocfs2: Should move ocfs2_start_trans out of lock_page
...In ext4, lock_page/unlock_page are in
ext4_journal_start/ext4_journal_stop, this can avoid such kind of dead
lock. So I think we should move ocfs2_start_trans/ocfs2_commit_trans out
of lock_page/unlock_page.
Totally there are 5 related functions:
ocfs2_write_begin_nolock
ocfs2_write_begin_inline
ocfs2_write_end_nolock
ocfs2_write_zero_page
ocfs2_convert_inline_data_to_extents
2023 Mar 20
2
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 5.10-stable tree
...873cf05f54a32183afff0161f44f9715 Mon Sep 17 00:00:00 2001
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
Date: Thu, 2 Mar 2023 16:38:43 +0100
Subject: [PATCH] ocfs2: fix data corruption after failed write
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Mar 20
1
FAILED: patch "[PATCH] ocfs2: fix data corruption after failed write" failed to apply to 4.19-stable tree
...873cf05f54a32183afff0161f44f9715 Mon Sep 17 00:00:00 2001
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
Date: Thu, 2 Mar 2023 16:38:43 +0100
Subject: [PATCH] ocfs2: fix data corruption after failed write
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Mar 21
1
[PATCH] ocfs2: fix data corruption after failed write
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
commit 90410bcf873cf05f54a32183afff0161f44f9715 upstream.
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.10-stable tree
...m>
Date: Thu, 2 Mar 2023 16:38:43 +0100
Subject: ocfs2: fix data corruption after failed write
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
commit 90410bcf873cf05f54a32183afff0161f44f9715 upstream.
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Mar 28
0
Patch "ocfs2: fix data corruption after failed write" has been added to the 5.4-stable tree
...m>
Date: Thu, 2 Mar 2023 16:38:43 +0100
Subject: ocfs2: fix data corruption after failed write
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
commit 90410bcf873cf05f54a32183afff0161f44f9715 upstream.
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Mar 03
0
+ ocfs2-fix-data-corruption-after-failed-write.patch added to mm-hotfixes-unstable branch
...king days
------------------------------------------------------
From: Jan Kara via Ocfs2-devel <ocfs2-devel at oss.oracle.com>
Subject: ocfs2: fix data corruption after failed write
Date: Thu, 2 Mar 2023 16:38:43 +0100
When buffered write fails to copy data into underlying page cache page,
ocfs2_write_end_nolock() just zeroes out and dirties the page. This can
leave dirty page beyond EOF and if page writeback tries to write this page
before write succeeds and expands i_size, page gets into inconsistent
state where page dirty bit is clear but buffer dirty bits stay set
resulting in page data never getting...
2023 Feb 17
1
[PATCH] ocfs2: fix defrag path triggering jbd2 ASSERT
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in ocfs2_write_end_nolock()")'.
For this bug, jbd2_journal_restart() is called by ocfs2_split_extent()
during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/s...
2009 Apr 07
0
[PATCH 1/1] OCFS2: use i_size_read() instead of direct accessing inode->i_size
use i_size_read() instead of accessing inode->i_size directly.
Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
--
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index b2c52b3..4491851 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1920,7 +1920,7 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
out_write_size:
pos += copied;
- if (pos > inode->i_size) {
+ if (pos > i_size_read(inode)) {
i_size_write(inode, pos);
mark_inode_dirty(inode);
}
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a5887df..eabfe65 100644
--- a/fs/ocfs2/file.c...
[merged mm-hotfixes-stable] ocfs2-fix-defrag-path-triggering-jbd2-assert.patch removed from -mm tree
2023 Feb 28
0
[merged mm-hotfixes-stable] ocfs2-fix-defrag-path-triggering-jbd2-assert.patch removed from -mm tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 6.2-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 5.15-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 5.10-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 5.4-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 4.19-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Mar 06
0
Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 4.14-stable tree
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start/...
2023 Feb 23
0
+ ocfs2-fix-defrag-path-triggering-jbd2-assert.patch added to mm-hotfixes-unstable branch
...[ocfs2]
#8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2]
#9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2]
Analysis
This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call
ocfs2_journal_access_di() before ocfs2_journal_dirty() in
ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is
called by ocfs2_split_extent() during defragmenting.
How to fix
For ocfs2_split_extent() can handle journal operations totally by itself.
Caller doesn't need to call journal access/dirty pair, and caller only
needs to call journal start...
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...truct inode *inode, loff_t pos,
{
void *kaddr;
+ mlog(0, "%llu, %lld, %u, %u, 0x%p, 0x%p)\n",
+ OCFS2_I(inode)->ip_blkno, pos, len, *copied, di, wc);
+
if (unlikely(*copied < len)) {
if (!PageUptodate(wc->w_target_page)) {
*copied = 0;
@@ -1877,6 +2014,9 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
handle_t *handle = wc->w_handle;
struct page *tmppage;
+ mlog_entry("(0x%p, %lld, %u, %u, %lu, 0x%p)\n",
+ mapping, pos, len, copied, page->index, fsdata);
+
if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
ocfs2_writ...
2009 Jul 21
1
(no subject)
...pos,
{
void *kaddr;
+ mlog(0, "%llu, %lld, %u, %u, 0x%p, 0x%p)\n",
+ (unsigned long long)OCFS2_I(inode)->ip_blkno, pos, len, *copied,
+ di, wc);
+
if (unlikely(*copied < len)) {
if (!PageUptodate(wc->w_target_page)) {
*copied = 0;
@@ -1877,6 +2023,9 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
handle_t *handle = wc->w_handle;
struct page *tmppage;
+ mlog_entry("(0x%p, %lld, %u, %u, %lu, 0x%p)\n",
+ mapping, pos, len, copied, page->index, fsdata);
+
if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
ocfs2_writ...