[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some concern about the journal support
From: |
Bean |
Subject: |
Re: Some concern about the journal support |
Date: |
Sat, 14 Jun 2008 01:05:47 +0800 |
On Fri, Jun 13, 2008 at 11:55 PM, Pavel Roskin <address@hidden> wrote:
> On Fri, 2008-06-13 at 17:05 +0800, Bean wrote:
>> Hi,
>>
>> I think we need to disable journal sometimes. Tools like grub-setup
>> and grub-install is run in an active system, that means sectors could
>> easily end up in the journal. However, journal is a temperately
>> buffer, space can be reused after a while. In this case, we should
>> bypass the journal and access the underlying file system directly.
>> Perhaps we can use a variable like no_journal to control the journal
>> support, any suggestions ?
>
> If we are going to hardcode block locations somewhere, hardcoding a
> journal location is a serious bug. It will be overwritten.
>
> If we are just reading from a live filesystem, there is no 100% correct
> solution, but avoiding the journal seems safer to me. We load the
> mappings once, but we read from the journal when the need arises. The
> journal can be overwritten by background activity that the administrator
> doesn't control. If we ignore the journal, inconsistencies would
> normally arise only if any files used by grub are modified in the
> meantime. Those should be owned by root, and no reasonable
> administrator would touch them while grub-install is running.
>
> We still want journal support for testing purposes, so perhaps
> grub-fstest should have a switch to use the journal.
Please see if my last patch works. Basically, it use read_hook as an
indicator. If read_hook is not null, which means we need to get a
block location, it use the fs address. If read_hook is null, which
means we don't care about the location, it use the journal address.
This should fit the problem.
btw, the reiserfs driver is a little strange, it don't follow the
normal path of grub_fshelp_read_file, perhaps we just disable the
journal at the moment.
--
Bean
- Some concern about the journal support, Bean, 2008/06/13
- Re: Some concern about the journal support, Pavel Roskin, 2008/06/13
- Re: Some concern about the journal support, Robert Millan, 2008/06/14
- Re: Some concern about the journal support, Bean, 2008/06/14
- Re: Some concern about the journal support, Bean, 2008/06/14