Bug 161674 - [ufs] snapshot on journaled ufs doesn't work
Summary: [ufs] snapshot on journaled ufs doesn't work
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kirk McKusick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-15 03:50 UTC by tanaka s
Modified: 2012-02-07 04:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tanaka s 2011-10-15 03:50:01 UTC
When creating snapshot on journaled ufs,
  (1) System will freeze,  or
  (2) Journaling and Softupdating will be disabled.

Fowllowing log is (2).

Before making snapshot,
    /dev/ada0p3 on /var (ufs, local, journaled soft-updates)
After making and deleting snapshot
    /dev/ada0p3 on /var (ufs, local)

********************************************************************
vexpress# uname -a
FreeBSD vexpress 9.0-BETA3 FreeBSD 9.0-BETA3 #0: Sat Sep 24 20:46:57 UTC 2011     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
vexpress# df -k
Filesystem  1024-blocks   Used    Avail Capacity  Mounted on
/dev/ada0p2      515676 209716   264708    44%    /
devfs                 1      1        0   100%    /dev
/dev/ada0p3     1031708   9264   939908     1%    /var
/dev/ada0p5    12380444 264400 11125612     2%    /usr
vexpress# mount
/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/ada0p3 on /var (ufs, local, journaled soft-updates)
/dev/ada0p5 on /usr (ufs, local, journaled soft-updates)
vexpress#
vexpress# dump -0aLu -f /usr/var3.dmp /var
  DUMP: Date of this level 0 dump: Sat Oct 15 11:09:20 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping snapshot of /dev/ada0p3 (/var) to /usr/var3.dmp
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 406 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: DUMP: 398 tape blocks on 1 volume
  DUMP: finished in 1 seconds, throughput 398 KBytes/sec
  DUMP: level 0 dump on Sat Oct 15 11:09:20 2011
  DUMP: Closing /usr/var3.dmp
  DUMP: DUMP IS DONE
vexpress#
vexpress#
vexpress# mount
/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/ada0p3 on /var (ufs, local)
/dev/ada0p5 on /usr (ufs, local, journaled soft-updates)
vexpress#

Fix: 

disable journaling

tunefs -n enable -j disable [file_system]
How-To-Repeat: Install FreeBSD 9 BETA3
# dump -0aLu -f [backupd_file] [journaled_file_system]
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2011-10-16 23:48:01 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

over to maintainer
Comment 2 Kirk McKusick freebsd_committer freebsd_triage 2012-02-07 04:27:05 UTC
State Changed
From-To: open->closed

This bug was fixed in head in -r230249: 

Make sure all intermediate variables holding mount flags (mnt_flag) 
and that all internal kernel calls passing mount flags are declared 
as uint64_t so that flags in the top 32-bits are not lost. 

The soft update journalling flag is located in the top 32-bits of 
mnt_flag and was being lost due to this bug. 

This fix was MFC'ed to 9 in -r230725 on Sun Jan 29 08:03:45 2012. 



Comment 3 Kirk McKusick freebsd_committer freebsd_triage 2012-02-07 04:27:05 UTC
Responsible Changed
From-To: freebsd-fs->mckusick

I have taken responsibility for this bug.