From: Jeff Mahoney <jeffm@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 5/5] ocfs2: Add check for type of b_size in struct buffer_head
Date: Thu Jan 31 12:55:18 2008 [thread overview]
Message-ID: <20080131204716.022642000@suse.com> (raw)
In-Reply-To: 20080131204634.478915000@suse.com
SLES10 has a b_size of type u32, not size_t in struct buffer_head. This
patch adds a check.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
Config.make.in | 1 +
configure.in | 5 +++++
fs/ocfs2/Makefile | 4 ++++
fs/ocfs2/journal.c | 7 ++++++-
4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Config.make.in b/Config.make.in
index 98bf410..24740c1 100644
--- a/Config.make.in
+++ b/Config.make.in
@@ -77,6 +77,7 @@ AOPS_IS_NOT_CONST = @AOPS_IS_NOT_CONST@
NO_VECTORIZED_AIO = @NO_VECTORIZED_AIO@
NO_SPLICE_FROM_PIPE = @NO_SPLICE_FROM_PIPE@
OLD_BIO_END_IO = @OLD_BIO_END_IO@
+B_SIZE_IS_U32 = @B_SIZE_IS_U32@
NO_EXPORTFS_HEADER = @NO_EXPORTFS_HEADER@
WRITEBACK_CONTROL_NO_RANGE_PREFIX = @WRITEBACK_CONTROL_NO_RANGE_PREFIX@
NO_SYNC_FILE_FLAGS = @NO_SYNC_FILE_FLAGS@
diff --git a/configure.in b/configure.in
index a4b3f0e..c783d4a 100644
--- a/configure.in
+++ b/configure.in
@@ -331,6 +331,11 @@ OCFS2_CHECK_KERNEL([old bio_end_io_t in bio.h], bio.h,
OLD_BIO_END_IO=yes, , [^typedef int (bio_end_io_t) (struct bio \*, unsigned int, int);])
AC_SUBST(OLD_BIO_END_IO)
+B_SIZE_IS_U32=
+OCFS2_CHECK_KERNEL([b_size is u32 struct buffer_head in buffer_head.h], buffer_head.h,
+ B_SIZE_IS_U32=yes, , [^ u32 b_size;])
+AC_SUBST(B_SIZE_IS_U32)
+
NO_EXPORTFS_HEADER=
OCFS2_CHECK_KERNEL([exportfs.h], exportfs.h,
, NO_EXPORTFS_HEADER=yes, [^struct export_operations {])
diff --git a/fs/ocfs2/Makefile b/fs/ocfs2/Makefile
index c8a81c4..af47a25 100644
--- a/fs/ocfs2/Makefile
+++ b/fs/ocfs2/Makefile
@@ -100,6 +100,10 @@ ifdef NO_SPLICE_FROM_PIPE
EXTRA_CFLAGS += -DNO_SPLICE_FROM_PIPE
endif
+ifdef B_SIZE_IS_U32
+EXTRA_CFLAGS += -DB_SIZE_IS_U32
+endif
+
ifdef NO_EXPORTFS_HEADER
EXTRA_CFLAGS += -DNO_EXPORTFS_HEADER
endif
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 0332505..907a1bf 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -235,7 +235,12 @@ int ocfs2_journal_access(handle_t *handle,
BUG_ON(!handle);
BUG_ON(!bh);
- mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n",
+ mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = "
+#ifdef B_SIZE_IS_U32
+ "%u\n",
+#else
+ "%zu\n",
+#endif
(unsigned long long)bh->b_blocknr, type,
(type == OCFS2_JOURNAL_ACCESS_CREATE) ?
"OCFS2_JOURNAL_ACCESS_CREATE" :
next prev parent reply other threads:[~2008-01-31 12:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 12:55 [Ocfs2-devel] [patch 0/5] [patch 0/5] Compatibility fixes for SLES10 Jeff Mahoney
2008-01-31 12:55 ` [Ocfs2-devel] [patch 4/5] ocfs2: Add check for const address_space_operations Jeff Mahoney
2008-02-01 15:38 ` [Ocfs2-devel] " Sunil Mushran
2008-01-31 12:55 ` [Ocfs2-devel] [patch 1/5] ocfs2: add compatibility for lockdep Jeff Mahoney
2008-02-01 15:38 ` [Ocfs2-devel] " Sunil Mushran
2008-01-31 12:55 ` Jeff Mahoney [this message]
2008-02-01 15:38 ` [Ocfs2-devel] Re: [patch 5/5] ocfs2: Add check for type of b_size in struct buffer_head Sunil Mushran
2008-01-31 12:55 ` [Ocfs2-devel] [patch 3/5] ocfs2: Add check for const file_operations Jeff Mahoney
2008-02-01 15:38 ` [Ocfs2-devel] " Sunil Mushran
2008-01-31 12:55 ` [Ocfs2-devel] [patch 2/5] ocfs2: add compatibility for mandatory_lock() Jeff Mahoney
2008-02-01 15:38 ` [Ocfs2-devel] " Sunil Mushran
2008-02-01 14:09 ` [Ocfs2-devel] Re: [patch 0/5] [patch 0/5] Compatibility fixes for SLES10 Sunil Mushran
2008-02-01 16:48 ` Jeff Mahoney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080131204716.022642000@suse.com \
--to=jeffm@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.