Skip to contentSkip to conversation

Question about VFS Locking patch, why is a change needed?

linux-lvm Steven Dake 2 participants 3 messages Apr 18, 2003 – Apr 22, 2003

lore
Share & tools
lore
#0 lore raw

Folks,

I was analyzing the VFS locking patch and I wanted to know if someone could explain the purpose of a change in the reiserfs for me:

The change is:
Index: linus.21/fs/reiserfs/super.c

fs/reiserfs/super.c Mon, 28 Jan 2002 13:50:56 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) renamed from fs/reiserfs/super.c Fri, 11 Jan 2002 10:14:59 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) +1 -1
@@ -66,7 +66,7 @@
    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
    reiserfs_block_writes(&th) ;
-    journal_end(&th, s, 1) ;
+    journal_end_sync(&th, s, 1) ;
  }
  s->s_dirt = dirty;
  unlock_kernel() ;

I tried LVM with and without this change even under heavy load and LVM can still create mountable snapshots of a reiser filesystem without the change. Why is it there?

Thanks
-steve

#1 lore raw
Quoted 21 lines · Steven Dake

Folks,

I was analyzing the VFS locking patch and I wanted to know if someone could explain the purpose of a change in the reiserfs for me:

The change is:
Index: linus.21/fs/reiserfs/super.c
--- linus.21/fs/reiserfs/super.c Fri, 11 Jan 2002 10:14:59 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644)
+++ linus.21(w)/fs/reiserfs/super.c Mon, 28 Jan 2002 13:50:56 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644)

fs/reiserfs/super.c Mon, 28 Jan 2002 13:50:56 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) renamed from fs/reiserfs/super.c Fri, 11 Jan 2002 10:14:59 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) +1 -1
@@ -66,7 +66,7 @@
     reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
     journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
     reiserfs_block_writes(&th) ;
-    journal_end(&th, s, 1) ;
+    journal_end_sync(&th, s, 1) ;
   }
   s->s_dirt = dirty;
   unlock_kernel() ;
Quoted 3 lines

I tried LVM with and without this change even under heavy load and LVM can still create mountable snapshots of a reiser filesystem without the change. Why is it there?

journal_end will do an asynchronous commit, which means it won't wait for the journal to actually finish writing to disk. journal_end_sync will wait until the commit is fully on disk.

In most cases, the reiserfs_block_writes call is sufficient and the journal_end_sync change isn't needed, but there are a few corner cases depending on the number of log writers where journal_end_sync is required.

-chris

#2 lore raw

Chris,

Thanks for the info !

-steve

Quoted 50 lines · Chris Mason
Quoted 20 lines · Steven Dake

Folks,

I was analyzing the VFS locking patch and I wanted to know if someone could explain the purpose of a change in the reiserfs for me:

The change is:
Index: linus.21/fs/reiserfs/super.c
--- linus.21/fs/reiserfs/super.c Fri, 11 Jan 2002 10:14:59 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644)
+++ linus.21(w)/fs/reiserfs/super.c Mon, 28 Jan 2002 13:50:56 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644)

fs/reiserfs/super.c Mon, 28 Jan 2002 13:50:56 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) renamed from fs/reiserfs/super.c Fri, 11 Jan 2002 10:14:59 -0500 root (linux/41_super.c 1.2.2.1.2.1.1.1 644) +1 -1
@@ -66,7 +66,7 @@
    reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
    journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
    reiserfs_block_writes(&th) ;
-    journal_end(&th, s, 1) ;
+    journal_end_sync(&th, s, 1) ;
  }
  s->s_dirt = dirty;
  unlock_kernel() ;
Quoted 3 lines

I tried LVM with and without this change even under heavy load and LVM can still create mountable snapshots of a reiser filesystem without the change. Why is it there?

journal_end will do an asynchronous commit, which means it won't wait for the journal to actually finish writing to disk. journal_end_sync will wait until the commit is fully on disk.

In most cases, the reiserfs_block_writes call is sufficient and the journal_end_sync change isn't needed, but there are a few corner cases depending on the number of log writers where journal_end_sync is required.

-chris

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/