Skip to contentSkip to conversation

anyone port data-logging patches to -rc3?

DISCUSSION Tom Vier 4 participants 8 messages May 23, 2003

lore
Share & tools
lore

Tom Vier

author
#0 lore raw

i started to, but the change in reiserfs/inode.c:reiserfs_truncate_file() is more than i want to play w/ (my first time looking at reiserfs code). i don't want to trash my fs. 8)

Signature · 2 lines
Tom Vier <[email protected]>
DSA Key ID 0xE6CB97DA
#1 lore raw

Hello!

Quoted 3 lines · Tom Vier

i started to, but the change in reiserfs/inode.c:reiserfs_truncate_file() is more than i want to play w/ (my first time looking at reiserfs code). i don't want to trash my fs. 8)

Ok, replacement patches are in ftp://ftp.namesys.com/pub/reiserfs-for-2.4/testing/data-logging-and-quota-2.4.21-rc3/

I tested it in all journaling modes and found zero problems. (have not tried crashing it, though).

Chris: I optimized reiserfs_truncate_file() a bit so that it won't do kmap() on the same page twice. Also I think I did correct thing with reiserfs_commit_for_tail/reiserfs_commit_for_inode stuff,
but I want you to take a look anyway.
And BTW, I think this "do O_DIRECT stuff on ordered/datalogging fs, receive error from write(2)" is counter-intuitive. what do you think about just only setting reiserfs_address_space_operations->direct_IO to non-NULL in case of writeback mount?
Also probably we do not want to allow remounting with different data-logging mode,
may be we should even add a check in reiserfs_remount() and spit out an error in such a case?

Bye,
Oleg

#2 lore raw
Quoted 8 lines · Oleg Drokin

Hello!

Quoted 3 lines · Tom Vier

i started to, but the change in reiserfs/inode.c:reiserfs_truncate_file() is more than i want to play w/ (my first time looking at reiserfs code). i don't want to trash my fs. 8)

Quoted 6 lines

Ok, replacement patches are in ftp://ftp.namesys.com/pub/reiserfs-for-2.4/testing/data-logging-and-quota-2.4.21-rc3/

I tested it in all journaling modes and found zero problems. (have not tried crashing it, though).

Thanks Oleg, I'm integrating all of this today.

Quoted 3 lines

Chris: I optimized reiserfs_truncate_file() a bit so that it won't do kmap() on the same page twice. Also I think I did correct thing with reiserfs_commit_for_tail/reiserfs_commit_for_inode stuff, but I want you to take a look anyway.

Will do.

Quoted 3 lines

And BTW, I think this "do O_DIRECT stuff on ordered/datalogging fs, receive error from write(2)" is counter-intuitive. what do you think about just only setting reiserfs_address_space_operations->direct_IO to non-NULL in case of writeback mount?

They'd get the same error, just sooner. I'm more inclined to fix things so that data=ordered works with O_DIRECT, lets see what I can come up with.

Quoted 2 lines

Also probably we do not want to allow remounting with different data-logging mode, may be we should even add a check in reiserfs_remount() and spit out an error in such a case?

Jeff Mahoney managed to trigger a race by switching between data=journal and the other modes. All we really need to do is be able to switch data mode when remounting from readonly to rw (as in for the root FS), so I'll limit the remounting code to that.

-chris

#3 lore raw

Hello!

Quoted 4 lines · Chris Mason
Quoted 3 lines

And BTW, I think this "do O_DIRECT stuff on ordered/datalogging fs, receive error from write(2)" is counter-intuitive. what do you think about just only setting reiserfs_address_space_operations->direct_IO to non-NULL in case of writeback mount?

They'd get the same error, just sooner. I'm more inclined to fix things

Yes, they'd get it at open() time which is much better, I think.

Quoted 2 lines

so that data=ordered works with O_DIRECT, lets see what I can come up with.

Still there is no chance for that to work in data=journal mode.

Quoted 6 lines
Quoted 2 lines

Also probably we do not want to allow remounting with different data-logging mode, may be we should even add a check in reiserfs_remount() and spit out an error in such a case?

Jeff Mahoney managed to trigger a race by switching between data=journal and the other modes. All we really need to do is be able to switch data mode when remounting from readonly to rw (as in for the root FS), so I'll limit the remounting code to that.

Any chance you would also rework journaling code a bit, so that it does not occupy ram for various tables/lists when the fs is in R/O mode?

Bye,
Oleg

#4 lore raw
Quoted 7 lines · Oleg Drokin

Hello!

Quoted 3 lines · Chris Mason
Quoted 3 lines

And BTW, I think this "do O_DIRECT stuff on ordered/datalogging fs, receive error from write(2)" is counter-intuitive. what do you think about just only setting reiserfs_address_space_operations->direct_IO to non-NULL in case of writeback mount?

Quoted 9 lines
Quoted 1 line

They'd get the same error, just sooner. I'm more inclined to fix things

Yes, they'd get it at open() time which is much better, I think.

Quoted 2 lines

so that data=ordered works with O_DIRECT, lets see what I can come up with.

Still there is no chance for that to work in data=journal mode.

Right, we can null out the func pointer when we change to data=journal mode.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Also probably we do not want to allow remounting with different data-logging mode, may be we should even add a check in reiserfs_remount() and spit out an error in such a case?

Jeff Mahoney managed to trigger a race by switching between data=journal and the other modes. All we really need to do is be able to switch data mode when remounting from readonly to rw (as in for the root FS), so I'll limit the remounting code to that.

Any chance you would also rework journaling code a bit, so that it does not occupy ram for various tables/lists when the fs is in R/O mode?

I think I would rather do that in 2.5.x first, perhaps along with some changes to more dynamic tables/lists for the journal memory structures. The data logging code started that process, but I'd like to keep the 2.4.x data logging changes smallish right now so we can get it all submitted.

Aside from that raid remount bug, do you see major problems with keeping the memory around in readonly mode?

-chris

#5 lore raw

Hello!

Quoted 6 lines · Chris Mason
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

Also probably we do not want to allow remounting with different data-logging mode, may be we should even add a check in reiserfs_remount() and spit out an error in such a case?

Jeff Mahoney managed to trigger a race by switching between data=journal and the other modes. All we really need to do is be able to switch data mode when remounting from readonly to rw (as in for the root FS), so I'll limit the remounting code to that.

Quoted 7 lines
Quoted 2 lines

Any chance you would also rework journaling code a bit, so that it does not occupy ram for various tables/lists when the fs is in R/O mode?

I think I would rather do that in 2.5.x first, perhaps along with some changes to more dynamic tables/lists for the journal memory structures. The data logging code started that process, but I'd like to keep the 2.4.x data logging changes smallish right now so we can get it all submitted.

This is ok with me.

Quoted 2 lines

Aside from that raid remount bug, do you see major problems with keeping the memory around in readonly mode?

Not major, but it allocates
(bmap_nr * sizeof(struct reiserfs_bitmap_node *) + SB_ONDISK_JOURNAL_SIZE(p_s_sb) * 2 * sizeof(struct reiserfs_journal_cnode)) bytes of ram that is never used.
This is kind of pity, esp. on small-ram boxes.

Bye,
Oleg

#6 lore raw
In reply to Oleg Drokin

Hello Oleg,

On Fri, 23 May 2003 13:46:33 +0400
Oleg Drokin <[email protected]> wrote:

  | Ok, replacement patches are in
  | ftp://ftp.namesys.com/pub/reiserfs-for-2.4/testing/data-logging-and-quota-2.4.21-rc3/
  | 

Patches apply fine but i have compile errors after applying the quota patches for 2.4.21-rc3 starting after 07...

Says: can't find files

<linux/dqblk_xfs.h>
<linux/dqblk_v1.h>
<linux/dqblk_v2.h>

Everything is fine with -rc2 patches except that it doesn't compile because of the rtnetlink_rcv_skb unresolved symbol with gcc-3.3 which is fixed in -rc3. :)

Thanks,

Philippe

Signature · 3 lines
Philippe Gramoullé
[email protected]
Lycos Europe - NOC France
#7 lore raw

Hello!

Quoted 9 lines · Philippe Gramoull?
  | Ok, replacement patches are in
  | ftp://ftp.namesys.com/pub/reiserfs-for-2.4/testing/data-logging-and-quota-2.4.21-rc3/
  | 

Patches apply fine but i have compile errors after applying the quota patches for 2.4.21-rc3 starting after 07...
Says: can't find files

<linux/dqblk_xfs.h>
<linux/dqblk_v1.h>
<linux/dqblk_v2.h>

Ah, stupid me.
I see.
Ok, then apply Chris' version of 07-... patch and then apply 07-quota_nospace_fix.diff.gz patch from our ftp that I just put there on top of it.

Bye,
Oleg