lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 24 Jan 2008 12:00:46 +0900
From:	"Takashi Sato" <t-sato@...jp.nec.com>
To:	"Theodore Ts'o" <tytso@....EDU>
Cc:	<linux-ext4@...r.kernel.org>,
	"Akira Fujita" <a-fujita@...jp.nec.com>,
	"Mingming Cao" <cmm@...ibm.com>
Subject: Re: ext4-online-defrag-free-space-fragmentation.patch uses do_fsync()

Hi,

> I was trying to build ext4 as a module, and ran into problems because
> the online defrag patch is calling do_fsync() which is *not* an exported
> symbol, and so can not be called from a module.
> 
> Looking at what the routine is doing, there's no reason to call
> do_fsync(), and in fact depending on the journaling mode in use, it may
> not force a journal commit, which seems to be the goal of the code.
> 
> Hence, I plan to merge the following fix into the the
> defrag-free-space-fragmentation patch, unless there are any objections
> from Takashi-San or Akira-San.

Thank you for your information and the proposition of the fix.
Your fix is correct, please merge it.

> Regards,
> 
> - Ted
> 
> diff --git a/fs/ext4/defrag.c b/fs/ext4/defrag.c
> index 4ef3dc0..19d2cfd 100644
> --- a/fs/ext4/defrag.c
> +++ b/fs/ext4/defrag.c
> @@ -632,8 +632,9 @@ static int ext4_ext_defrag_victim(struct file *target_filp,
>  }
> 
>  /* Sync journal blocks before reservation */
> - if (do_fsync(target_filp, 0)) {
> - printk(KERN_ERR "defrag: failed do_fsync\n");
> + ret = ext4_force_commit(sb);
> + if (ret) {
> + printk(KERN_ERR "defrag: failed do_fsync (%d)\n", ret);
>  goto ERR;
>  }
>  }
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Cheers, Takashi
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists