Message ID | 1366502828-7793-3-git-send-email-tytso@mit.edu |
---|---|
State | Superseded, archived |
Headers | show |
On 04/21/2013 02:07 AM, Theodore Ts'o wrote: > This allows metadata writebacks which are issued via block device > writeback to be sent with the current write request flags. Hi, where do these come from? fs/ext4/ext4_jbd2.c: In function ‘__ext4_handle_dirty_metadata’: fs/ext4/ext4_jbd2.c:218:2: error: implicit declaration of function ‘mark_buffer_meta’ [-Werror=implicit-function-declaration] fs/ext4/ext4_jbd2.c:219:2: error: implicit declaration of function ‘mark_buffer_prio’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors > Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> > --- > fs/ext4/ext4_jbd2.c | 2 ++ > fs/ext4/inode.c | 6 +++++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c > index 0e1dc9e..fd97b81 100644 > --- a/fs/ext4/ext4_jbd2.c > +++ b/fs/ext4/ext4_jbd2.c > @@ -215,6 +215,8 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, > > might_sleep(); > > + mark_buffer_meta(bh); > + mark_buffer_prio(bh); > if (ext4_handle_valid(handle)) { > err = jbd2_journal_dirty_metadata(handle, bh); > if (err) { > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 62492e9..d7518e2 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -1080,10 +1080,14 @@ retry_journal: > /* For write_end() in data=journal mode */ > static int write_end_fn(handle_t *handle, struct buffer_head *bh) > { > + int ret; > if (!buffer_mapped(bh) || buffer_freed(bh)) > return 0; > set_buffer_uptodate(bh); > - return ext4_handle_dirty_metadata(handle, NULL, bh); > + ret = ext4_handle_dirty_metadata(handle, NULL, bh); > + clear_buffer_meta(bh); > + clear_buffer_prio(bh); > + return ret; > } > > /* >
On Sun, Apr 21, 2013 at 08:09:14AM +0200, Jiri Slaby wrote: > On 04/21/2013 02:07 AM, Theodore Ts'o wrote: > > This allows metadata writebacks which are issued via block device > > writeback to be sent with the current write request flags. > > Hi, where do these come from? > fs/ext4/ext4_jbd2.c: In function ‘__ext4_handle_dirty_metadata’: > fs/ext4/ext4_jbd2.c:218:2: error: implicit declaration of function > ‘mark_buffer_meta’ [-Werror=implicit-function-declaration] > fs/ext4/ext4_jbd2.c:219:2: error: implicit declaration of function > ‘mark_buffer_prio’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors They are defined by "[PATCH 2/3] buffer: add BH_Prio and BH_Meta flags" here: +BUFFER_FNS(Meta, meta) +BUFFER_FNS(Prio, prio) When you tried applying this patch, did you try applying all three patches in the patch series? - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 0e1dc9e..fd97b81 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -215,6 +215,8 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, might_sleep(); + mark_buffer_meta(bh); + mark_buffer_prio(bh); if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata(handle, bh); if (err) { diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 62492e9..d7518e2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1080,10 +1080,14 @@ retry_journal: /* For write_end() in data=journal mode */ static int write_end_fn(handle_t *handle, struct buffer_head *bh) { + int ret; if (!buffer_mapped(bh) || buffer_freed(bh)) return 0; set_buffer_uptodate(bh); - return ext4_handle_dirty_metadata(handle, NULL, bh); + ret = ext4_handle_dirty_metadata(handle, NULL, bh); + clear_buffer_meta(bh); + clear_buffer_prio(bh); + return ret; } /*
This allows metadata writebacks which are issued via block device writeback to be sent with the current write request flags. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> --- fs/ext4/ext4_jbd2.c | 2 ++ fs/ext4/inode.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)