Hi,
The previous patch was an old one. Hence I am sending the latest patch
rebased to 2.6.22-rc5. I have also fixed few coding style issues in both
the patches.
Regards,
Girish
On Fri, 2007-06-22 at 15:06 +0530, Girish Shilamkar wrote:
> --- linux-2.6.22-rc5.orig/fs/jbd2/journal.c
> +++ linux-2.6.22-rc5/fs/jbd2/journal.c
> @@ -1272,6 +1272,33 @@ int jbd2_journal_set_features (journal_t
> return 1;
> }
>
> +/**
> + * int jbd2_journal_clear_features () - Clear a given journal feature
> in the superblock
> + * @journal: Journal to act on.
> + * @compat: bitmask of compatible features
> + * @ro: bitmask of features that force read-only mount
> + * @incompat: bitmask of incompatible features
> + *
> + * Clear a given journal feature as present on the
> + * superblock. Returns true if the requested features could be
> reset.
> + *
> + */
> +int jbd2_journal_clear_features (journal_t *journal, unsigned long
> compat,
> + unsigned long ro, unsigned long incompat)
> +{
> + journal_superblock_t *sb;
> +
> + jbd_debug(1, "Clear features 0x%lx/0x%lx/0x%lx\n",
> + compat, ro, incompat);
> +
> + sb = journal->j_superblock;
> +
> + sb->s_feature_compat &= ~cpu_to_be32(compat);
> + sb->s_feature_ro_compat &= ~cpu_to_be32(ro);
> + sb->s_feature_incompat &= ~cpu_to_be32(incompat);
> +
> + return 1;
> +}
This needs an EXPORT_SYMBOL(jbd2_journal_clear_features). Otherwise,
ext4 can't be built as a module.
--
David Kleikamp
IBM Linux Technology Center
On Fri, 2007-06-22 at 11:05 -0500, Dave Kleikamp wrote:
> This needs an EXPORT_SYMBOL(jbd2_journal_clear_features). Otherwise,
> ext4 can't be built as a module.
Thanks for the catch.
I have attached the updated patch.
Thanks, Girish.
On Fri, 2007-06-22 at 15:06 +0530, Girish Shilamkar wrote:
> Hi,
> The previous patch was an old one. Hence I am sending the latest patch
> rebased to 2.6.22-rc5. I have also fixed few coding style issues in both
> the patches.
>
> Regards,
> Girish
This patch had a bug. Thanks to Valerie for pointing it out.
Regards,
Girish.
Index: linux-2.6.22-rc5/fs/jbd2/commit.c
===================================================================
--- linux-2.6.22-rc5.orig/fs/jbd2/commit.c
+++ linux-2.6.22-rc5/fs/jbd2/commit.c
@@ -121,8 +121,8 @@ static int journal_submit_commit_record(
bh = jh2bh(descriptor);
for (i = 0; i < bh->b_size; i += 512) {
- struct commit_header *tmp = (struct commit_header *)bh->b_data +
- i;
+ struct commit_header *tmp = (struct commit_header *)(bh->b_data+
+ i);
tmp->h_magic = cpu_to_be32(JBD2_MAGIC_NUMBER);
tmp->h_blocktype = cpu_to_be32(JBD2_COMMIT_BLOCK);
tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
On Tue, 2007-06-26 at 16:17 +0530, Girish Shilamkar wrote:
> On Fri, 2007-06-22 at 15:06 +0530, Girish Shilamkar wrote:
> > Hi,
> > The previous patch was an old one. Hence I am sending the latest patch
> > rebased to 2.6.22-rc5. I have also fixed few coding style issues in both
> > the patches.
> >
> > Regards,
> > Girish
> This patch had a bug. Thanks to Valerie for pointing it out.
I updated the patch queue with the updated patch and this fix.
Thanks,
Shaggy
> Regards,
> Girish.
>
> Index: linux-2.6.22-rc5/fs/jbd2/commit.c
> ===================================================================
> --- linux-2.6.22-rc5.orig/fs/jbd2/commit.c
> +++ linux-2.6.22-rc5/fs/jbd2/commit.c
> @@ -121,8 +121,8 @@ static int journal_submit_commit_record(
> bh = jh2bh(descriptor);
>
> for (i = 0; i < bh->b_size; i += 512) {
> - struct commit_header *tmp = (struct commit_header *)bh->b_data +
> - i;
> + struct commit_header *tmp = (struct commit_header *)(bh->b_data+
> + i);
> tmp->h_magic = cpu_to_be32(JBD2_MAGIC_NUMBER);
> tmp->h_blocktype = cpu_to_be32(JBD2_COMMIT_BLOCK);
> tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
>
>
--
David Kleikamp
IBM Linux Technology Center