CVS log for src/sys/ufs/ffs/ffs_softdep.c
Up to [FreeBSD] / src / sys / ufs / ffs
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.293: download - view: text, markup, annotated - select for diffs
Mon Feb 6 17:59:14 2012 UTC (4 days, 7 hours ago) by kib
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +2 -1 lines
SVN rev 231091 on 2012-02-06 17:59:14Z by kib Add missing opt_quota.h include to activate #ifdef QUOTA blocks, apparently a step in unbreaking QUOTA support. Reported and tested by: Adam Strohl <adams-freebsd ateamsystems com> MFC after: 1 week
Revision 1.292: download - view: text, markup, annotated - select for diffs
Mon Feb 6 11:47:24 2012 UTC (4 days, 13 hours ago) by kib
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +1 -0 lines
SVN rev 231077 on 2012-02-06 11:47:24Z by kib JNEWBLK dependency may legitimately appear on the buf dependency list. If softdep_sync_buf() discovers such dependency, it should do nothing, which is safe as it is only waiting on the parent buffer to be written, so it can be removed. Committed on behalf of: jeff MFC after: 1 week
Revision 1.290.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (3 months ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.290.2.1: preferred, colored; next MAIN 1.291: preferred, colored
Changes since revision 1.290.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.291: download - view: text, markup, annotated - select for diffs
Mon Nov 7 15:43:11 2011 UTC (3 months ago) by ed
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +5 -4 lines
SVN rev 227309 on 2011-11-07 15:43:11Z by ed Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
Revision 1.290.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.290: preferred, colored; next MAIN 1.291: preferred, colored
Changes since revision 1.290: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.290: download - view: text, markup, annotated - select for diffs
Tue Sep 20 21:53:26 2011 UTC (4 months, 3 weeks ago) by kib
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +1 -1 lines
SVN rev 225700 on 2011-09-20 21:53:26Z by kib Use nowait sync request for a vnode when doing softdep cleanup. We possibly own the unrelated vnode lock, doing waiting sync causes deadlocks. Reported and tested by: pho Approved by: re (bz)
Revision 1.289: download - view: text, markup, annotated - select for diffs
Thu Aug 25 08:17:39 2011 UTC (5 months, 2 weeks ago) by mm
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +2 -2 lines
SVN rev 225166 on 2011-08-25 08:17:39Z by mm Generalize ffs_pages_remove() into vn_pages_remove(). Remove mapped pages for all dataset vnodes in zfs_rezget() using new vn_pages_remove() to fix mmapped files changed by zfs rollback or zfs receive -F. PR: kern/160035, kern/156933 Reviewed by: kib, pjd Approved by: re (kib) MFC after: 1 week
Revision 1.288: download - view: text, markup, annotated - select for diffs
Sat Jul 30 00:43:18 2011 UTC (6 months, 1 week ago) by mckusick
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +20 -19 lines
SVN rev 224503 on 2011-07-30 00:43:18Z by mckusick Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP is set so that mount can revert back to using MNT_NOWAIT when doing getmntinfo. Approved by: re (kib)
Revision 1.287: download - view: text, markup, annotated - select for diffs
Sun Jul 24 18:27:09 2011 UTC (6 months, 2 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +19 -19 lines
SVN rev 224294 on 2011-07-24 18:27:09Z by mckusick Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag so that it is visible to userland programs. This change enables the `mount' command with no arguments to be able to show if a filesystem is mounted using journaled soft updates as opposed to just normal soft updates. Approved by: re (bz)
Revision 1.286: download - view: text, markup, annotated - select for diffs
Thu Jul 14 18:06:13 2011 UTC (6 months, 4 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +2 -2 lines
SVN rev 224027 on 2011-07-14 18:06:13Z by mckusick Consistently check mount flag (MNTK_SUJ) rather than superblock flag (FS_SUJ) when determining whether to do journaling-based operations. The mount flag is set only when journaling is active while the superblock flag is set to indicate that journaling is to be used. For example, when the filesystem is mounted read-only, the journaling may be present (FS_SUJ) but not active (MNTK_SUJ). Inappropriate checking of the FS_SUJ flag was causing some journaling actions to be attempted at inappropriate times.
Revision 1.285: download - view: text, markup, annotated - select for diffs
Mon Jul 4 22:08:04 2011 UTC (7 months, 1 week ago) by jeff
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +40 -13 lines
SVN rev 223772 on 2011-07-04 22:08:04Z by jeff - Speed up pendingblock processing again. Having too much delay between ffs_blkfree() and the pending adjustment causes all kinds of space related problems.
Revision 1.284: download - view: text, markup, annotated - select for diffs
Mon Jul 4 21:04:25 2011 UTC (7 months, 1 week ago) by jeff
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +1 -0 lines
SVN rev 223771 on 2011-07-04 21:04:25Z by jeff - Handle D_JSEGDEP in the softdep_sync_buf() switch. These can now find themselves on snapshot vnodes. Reported by: pho
Revision 1.283: download - view: text, markup, annotated - select for diffs
Mon Jul 4 20:53:55 2011 UTC (7 months, 1 week ago) by jeff
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +21 -25 lines
SVN rev 223770 on 2011-07-04 20:53:55Z by jeff - It is impossible to run request_cleanup() while doing a copyonwrite. This will most likely cause new block allocations which can recurse into request cleanup. - While here optimize the ufs locking slightly. We need only acquire and drop once. - process_removes() and process_truncates() also is only needed once. - Attempt to flush each item on the worklist once but do not loop forever if some can not be completed. Discussed with: mckusick
Revision 1.282: download - view: text, markup, annotated - select for diffs
Wed Jun 29 22:12:43 2011 UTC (7 months, 1 week ago) by mckusick
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +1 -0 lines
SVN rev 223687 on 2011-06-29 22:12:43Z by mckusick Handle the FREEDEP case in softdep_sync_buf(). This fix failed to get added in -r223325. Submitted by: Peter Holm
Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon Jun 20 03:25:09 2011 UTC (7 months, 3 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +161 -45 lines
SVN rev 223325 on 2011-06-20 03:25:09Z by jeff - Fix directory count rollbacks by passing the mode to the journal dep earlier. - Add rollback/forward code for frag and cluster accounting. - Handle the FREEDEP case in softdep_sync_buf(). (submitted by pho)
Revision 1.280: download - view: text, markup, annotated - select for diffs
Wed Jun 15 23:19:09 2011 UTC (7 months, 3 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +7 -4 lines
SVN rev 223127 on 2011-06-15 23:19:09Z by mckusick Ensure that filesystem metadata contained within persistent snapshots is always kept consistent. Suggested by: Jeff Roberson
Revision 1.279: download - view: text, markup, annotated - select for diffs
Wed Jun 15 06:13:08 2011 UTC (7 months, 3 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +4 -0 lines
SVN rev 223105 on 2011-06-15 06:13:08Z by mckusick Missing cleanup case after completion of a snapshot vnode write claiming a released block. Submitted by: Jeff Roberson Tested by: Peter Holm
Revision 1.278: download - view: text, markup, annotated - select for diffs
Sun Jun 12 19:27:05 2011 UTC (7 months, 4 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +92 -13 lines
SVN rev 223020 on 2011-06-12 19:27:05Z by mckusick Update to soft updates journaling to properly track freed blocks that get claimed by snapshots. Submitted by: Jeff Roberson Tested by: Peter Holm
Revision 1.277: download - view: text, markup, annotated - select for diffs
Sun Jun 12 18:46:48 2011 UTC (7 months, 4 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +9 -2 lines
SVN rev 223018 on 2011-06-12 18:46:48Z by mckusick Disable the soft updates journaling after a filesystem is successfully downgraded to read-only. It will be restarted if the filesystem is upgraded back to read-write.
Revision 1.276: download - view: text, markup, annotated - select for diffs
Fri Jun 10 22:48:35 2011 UTC (8 months ago) by jeff
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +2407 -1320 lines
SVN rev 222958 on 2011-06-10 22:48:35Z by jeff Implement fully asynchronous partial truncation with softupdates journaling to resolve errors which can cause corruption on recovery with the old synchronous mechanism. - Append partial truncation freework structures to indirdeps while truncation is proceeding. These prevent new block pointers from becoming valid until truncation completes and serialize truncations. - On completion of a partial truncate journal work waits for zeroed pointers to hit indirects. - softdep_journal_freeblocks() handles last frag allocation and last block zeroing. - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it is only implemented in one place. - Block allocation failure handling moved up one level so it does not proceed with buf locks held. This permits us to do more extensive reclaims when filesystem space is exhausted. - softdep_sync_metadata() is broken into two parts, the first executes once at the start of ffs_syncvnode() and flushes truncations and inode dependencies. The second is called on each locked buf. This eliminates excessive looping and rollbacks. - Improve the mechanism in process_worklist_item() that handles acquiring vnode locks for handle_workitem_remove() so that it works more generally and does not loop excessively over the same worklist items on each call. - Don't corrupt directories by zeroing the tail in fsck. This is only done for regular files. - Push a fsync complete record for files that need it so the checker knows a truncation in the journal is no longer valid. Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts) Tested by: pho
Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri May 13 05:27:58 2011 UTC (9 months ago) by mdf
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +1 -1 lines
SVN rev 221829 on 2011-05-13 05:27:58Z by mdf Use a name instead of a magic number for kern_yield(9) when the priority should not change. Fetch the td_user_pri under the thread lock. This is probably not necessary but a magic number also seems preferable to knowing the implementation details here. Requested by: Jason Behmer < jason DOT behmer AT isilon DOT com >
Revision 1.274: download - view: text, markup, annotated - select for diffs
Mon Apr 11 01:43:59 2011 UTC (10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +221 -151 lines
SVN rev 220532 on 2011-04-11 01:43:59Z by jeff - Refactor softdep_setup_freeblocks() into a set of functions to prepare for a new journal specific partial truncate routine. - Use dep_current[] in place of specific dependency counts. This is automatically maintained when workitems are allocated and has less risk of becoming incorrect.
Revision 1.273: download - view: text, markup, annotated - select for diffs
Sun Apr 10 03:49:53 2011 UTC (10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +212 -56 lines
SVN rev 220511 on 2011-04-10 03:49:53Z by jeff Fix a long standing SUJ performance problem: - Keep a hash of indirect blocks that have recently been freed and are still referenced in the journal. - Lookup blocks in this hash before forcing a new block write to wait on the journal entry to hit the disk. This is only necessary to avoid confusion between old identities as indirects and new identities as file blocks. - Don't free jseg structures until the journal has written a record that invalidates it. This keeps the indirect block information around for as long as is required to be safe. - Force an empty journal block write when required to flush out stale journal data that is simply waiting for the oldest valid sequence number to advance beyond it.
Revision 1.272: download - view: text, markup, annotated - select for diffs
Thu Apr 7 03:19:10 2011 UTC (10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +228 -100 lines
SVN rev 220406 on 2011-04-07 03:19:10Z by jeff - Don't invalidate jnewblks immediately upon discovering that the block will be removed. Permit the journal to proceed so that we don't leave a rollback in a cg for a very long time as this can cause terrible perf problems in low memory situations. Tested by: pho
Revision 1.271: download - view: text, markup, annotated - select for diffs
Tue Apr 5 21:26:05 2011 UTC (10 months, 1 week ago) by mckusick
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +124 -13 lines
SVN rev 220374 on 2011-04-05 21:26:05Z by mckusick Be far more persistent in reclaiming blocks and inodes before giving up and declaring a filesystem out of space. Especially necessary when running on a small filesystem. With this improvement, it should be possible to use soft updates on a small root filesystem. Kudos to: Peter Holm Testing by: Peter Holm MFC: 2 weeks
Revision 1.270: download - view: text, markup, annotated - select for diffs
Sat Apr 2 21:52:58 2011 UTC (10 months, 1 week ago) by jeff
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +14 -9 lines
SVN rev 220282 on 2011-04-02 21:52:58Z by jeff Fix problems that manifested from filesystem full conditions: - In softdep_revert_mkdir() find the dotaddref before we attempt to cancel the jaddref so we can make assumptions about where the dotaddref is on the list. cancel_jaddref() does not always remove items from the list anymore. - Always set GOINGAWAY on an inode in softdep_freefile() if DEPCOMPLETE was never set. This ensures that dependencies will continue to be processed on the inowait/bufwait list and is more an artifact of the structure of the code than a pure ordering problem. - Always set DEPCOMPLETE on canceled jaddrefs so that they can be freed appropriately. This normally occurs when the refs are added to the journal but if they are canceled before this point the state would never be set and the dependency could never be freed. Reported by: pho Tested by: pho
Revision 1.269: download - view: text, markup, annotated - select for diffs
Mon Mar 28 12:39:48 2011 UTC (10 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +2 -1 lines
SVN rev 220099 on 2011-03-28 12:39:48Z by kib Fix the softdep_request_cleanup() function definition for !SOFTUPDATES case. Submitted by: Aleksandr Rybalko <ray dlink ua>
Revision 1.268: download - view: text, markup, annotated - select for diffs
Wed Mar 23 05:13:54 2011 UTC (10 months, 2 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +28 -17 lines
SVN rev 219895 on 2011-03-23 05:13:54Z by mckusick Add retry code analogous to the block allocation retry code to avoid running out of inodes. Reported by: Peter Holm
Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat Feb 12 12:52:12 2011 UTC (11 months, 4 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +13 -11 lines
SVN rev 218602 on 2011-02-12 12:52:12Z by kib Use the native sector size of the device backing the UFS volume for SU+J journal blocks, instead of hard coding 512 byte sector size. Journal need to atomically write the block, that can only be guaranteed at the device sector size, not larger. Attempt to write less then sector size results in driver errors. Note that this is the first structure in UFS that depends on the sector size. Other elements are written in the units of fragments. In collaboration with: pho Reviewed by: jeff Tested by: bz, pho
Revision 1.266: download - view: text, markup, annotated - select for diffs
Wed Feb 9 15:33:13 2011 UTC (12 months ago) by netchild
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +3 -0 lines
SVN rev 218485 on 2011-02-09 15:33:13Z by netchild Add some FEATURE macros for some UFS features. SU+J is not included as a FEATURE macro: - it was not in the tree during the GSoC - I do not see an option to en-/disable it in NOTES Two minor changes where made during the review compared to what was developed during GSoC 2010. No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: kib X-MFC after: to be determined in last commit with code from this project
Revision 1.265: download - view: text, markup, annotated - select for diffs
Tue Feb 8 00:16:36 2011 UTC (12 months ago) by mdf
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +1 -1 lines
SVN rev 218424 on 2011-02-08 00:16:36Z by mdf Based on discussions on the svn-src mailing list, rework r218195: - entirely eliminate some calls to uio_yeild() as being unnecessary, such as in a sysctl handler. - move should_yield() and maybe_yield() to kern_synch.c and move the prototypes from sys/uio.h to sys/proc.h - add a slightly more generic kern_yield() that can replace the functionality of uio_yield(). - replace source uses of uio_yield() with the functional equivalent, or in some cases do not change the thread priority when switching. - fix a logic inversion bug in vlrureclaim(), pointed out by bde@. - instead of using the per-cpu last switched ticks, use a per thread variable for should_yield(). With PREEMPTION, the only reasonable use of this is to determine if a lock has been held a long time and relinquish it. Without PREEMPTION, this is essentially the same as the per-cpu variable.
Revision 1.264: download - view: text, markup, annotated - select for diffs
Wed Feb 2 16:35:10 2011 UTC (12 months, 1 week ago) by mdf
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +2 -3 lines
SVN rev 218195 on 2011-02-02 16:35:10Z by mdf Put the general logic for being a CPU hog into a new function should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield(). Change several checks for a magic number of iterations to use should_yield() instead. MFC after: 1 week
Revision 1.263: download - view: text, markup, annotated - select for diffs
Wed Jan 12 19:54:19 2011 UTC (12 months, 4 weeks ago) by mdf
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +2 -2 lines
SVN rev 217326 on 2011-01-12 19:54:19Z by mdf sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the kernel changes.
Revision 1.262: download - view: text, markup, annotated - select for diffs
Tue Jan 4 10:25:55 2011 UTC (13 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +15 -15 lines
SVN rev 216951 on 2011-01-04 10:25:55Z by kib Instead of incrementing freework reference counter in indir_trunc(), do it at the allocation time for journaled fs and indirect blocks, when the allocated object is not accessible outside. Requested and reviewed by: jeff Tested by: pho
Revision 1.261: download - view: text, markup, annotated - select for diffs
Thu Dec 30 10:52:07 2010 UTC (13 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +5 -7 lines
SVN rev 216818 on 2010-12-30 10:52:07Z by kib Handle missing jremrefs when a directory is renamed overtop of another, deleting it. If the directory is removed, UFS always need to remove the .. ref, even if the ultimate ref on the parent would not change. The new directory must have a new journal entry for that ref. Otherwise journal processing would not properly account for the parent's reference since it will belong to a removed directory entry. Change ufs_rename()'s dotdot rename section to always setup_dotdot_link(). In the tip != NULL case SUJ needs the newref dependency allocated via setup_dotdot_link(). Stop setting isrmdir to 2 for newdirrem() in softdep_setup_remove(). Remove the isdirrem > 1 checks from newdirrem(). Reported by: many Submitted by: jeff Tested by: pho
Revision 1.260: download - view: text, markup, annotated - select for diffs
Thu Dec 30 10:41:17 2010 UTC (13 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +29 -10 lines
SVN rev 216817 on 2010-12-30 10:41:17Z by kib In indir_trunc(), when processing jnewblk entries that are not written to the disk, recurse to handle indirect blocks of next level that are hidden by the corresponding entry. In collaboration with: pho Reviewed by: jeff, mckusick Tested by: mckusick, pho
Revision 1.259: download - view: text, markup, annotated - select for diffs
Wed Dec 29 12:16:06 2010 UTC (13 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +2 -0 lines
SVN rev 216795 on 2010-12-29 12:16:06Z by kib Move the definition of mkdirlisthd from header to C file. Reviewed by: mckusick Tested by: pho
Revision 1.258: download - view: text, markup, annotated - select for diffs
Thu Dec 23 00:38:57 2010 UTC (13 months, 2 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +2 -1 lines
SVN rev 216676 on 2010-12-23 00:38:57Z by mckusick
This patch fixes a soft update panic while running perl 5.12 tests
which produced:
panic: indir_trunc: Index out of range -148 parent -2061 lbn -305164
Reported by: Dimitry Andric
Fixed by: Jeff Roberson
Revision 1.211.2.11.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.211.2.11: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211.2.11: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.234.2.3.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.234.2.3: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.2.3: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.257: download - view: text, markup, annotated - select for diffs
Sat Nov 27 20:27:07 2010 UTC (14 months, 2 weeks ago) by pho
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +6 -5 lines
SVN rev 215950 on 2010-11-27 20:27:07Z by pho First step in fixing the handle_workitem_freeblocks panic. In collaboration with: kib
Revision 1.256: download - view: text, markup, annotated - select for diffs
Thu Nov 11 11:54:01 2010 UTC (15 months ago) by kib
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +5 -2 lines
SVN rev 215117 on 2010-11-11 11:54:01Z by kib The softdep_setup_freeblocks() adds worklist items before deallocate_dependencies() is done. This opens a race between softdep thread and the thread that does the truncation: A write of the indirect block causes the freeblks to become ALLCOMPLETE while softdep_setup_freeblocks() dropped softdep lock. And then, softdep_disk_write_complete() would reassign the workitem to the mount point worklist, causing premature processing of the workitem, or journal write exhaust the fb_jfreeblkhd and handle_written_jfreeblk does the same reassign. indir_trunc() then would find the indirect block that is locked (with lock owned by kernel) but without any dependencies, causing it to hang in getblk() waiting for buffer lock. Do not mark freeblks as DEPCOMPLETE until deallocate_dependencies() finished. Analyzed, suggested and reviewed by: jeff Tested by: pho
Revision 1.255: download - view: text, markup, annotated - select for diffs
Thu Nov 11 11:41:52 2010 UTC (15 months ago) by kib
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +5 -5 lines
SVN rev 215115 on 2010-11-11 11:41:52Z by kib Change #ifdef INVARIANTS panic into KASSERT, and print some useful information to diagnose the issue, in handle_complete_freeblocks(). Reviewed by: jeff Tested by: pho
Revision 1.254: download - view: text, markup, annotated - select for diffs
Thu Nov 11 11:38:57 2010 UTC (15 months ago) by kib
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +18 -13 lines
SVN rev 215114 on 2010-11-11 11:38:57Z by kib In journal_mount(), only set MNTK_SUJ flag after the jblocks are mapped. I believe there is a window otherwise where jblocks can be accessed without proper initialization. Reviewed by: jeff Tested by: pho
Revision 1.253: download - view: text, markup, annotated - select for diffs
Thu Nov 11 11:35:42 2010 UTC (15 months ago) by kib
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +1 -3 lines
SVN rev 215113 on 2010-11-11 11:35:42Z by kib Add function lbn_offset to calculate offset of the indirect block of given level. Reviewed by: jeff Tested by: pho
Revision 1.252: download - view: text, markup, annotated - select for diffs
Thu Nov 11 11:26:59 2010 UTC (15 months ago) by kib
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +2 -2 lines
SVN rev 215112 on 2010-11-11 11:26:59Z by kib Fix typo. Function is called ffs_blkfree.
Revision 1.251: download - view: text, markup, annotated - select for diffs
Sat Oct 2 17:58:57 2010 UTC (16 months, 1 week ago) by alc
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +1 -1 lines
SVN rev 213363 on 2010-10-02 17:58:57Z by alc M_USE_RESERVE has been deprecated for a decade. Eliminate any uses that have no run-time effect.
Revision 1.250: download - view: text, markup, annotated - select for diffs
Wed Sep 29 14:46:57 2010 UTC (16 months, 1 week ago) by mckusick
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +3 -2 lines
SVN rev 213275 on 2010-09-29 14:46:57Z by mckusick Since local variable 'i' is used only in a KASSERT, declare and initialize it only if INVARIANTS is defined to avoid a declared but unused warning. Suggested by: Brian Somers <brian@FreeBSD.org>
Revision 1.249: download - view: text, markup, annotated - select for diffs
Wed Sep 29 07:40:11 2010 UTC (16 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +1 -1 lines
SVN rev 213259 on 2010-09-29 07:40:11Z by kib Fix typo in comment.
Revision 1.248: download - view: text, markup, annotated - select for diffs
Tue Sep 14 18:04:05 2010 UTC (16 months, 3 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +9 -9 lines
SVN rev 212617 on 2010-09-14 18:04:05Z by mckusick Update comments in soft updates code to more fully describe the addition of journalling. Only functional change is to tighten a KASSERT. Reviewed by: jeff Roberson
Revision 1.211.2.11: download - view: text, markup, annotated - select for diffs
Fri Aug 20 20:58:57 2010 UTC (17 months, 3 weeks ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.211.2.10: preferred, colored; branchpoint 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211.2.10: +3 -9 lines
SVN rev 211533 on 2010-08-20 20:58:57Z by jhb Revert 210173 as it did not properly fix the bug. It assumed that the VI_LOCK() for a given vnode was used as the internal interlock for that vnode's v_lock lockmgr lock. This is not the case. Instead, add dedicated routines to toggle the LK_NOSHARE and LK_CANRECURSE flags. These routines lock the lockmgr lock's internal interlock to synchronize the updates to the flags member with other threads attempting to acquire the lock. The VN_LOCK_A*() macros now invoke these routines, and the softupdates code uses these routines to temporarly enable recursion on buffer locks. Reviewed by: kib
Revision 1.247: download - view: text, markup, annotated - select for diffs
Fri Aug 20 19:46:50 2010 UTC (17 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +2 -2 lines
SVN rev 211531 on 2010-08-20 19:46:50Z by jhb Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that the associated lockmgr lock is exclusively locked by the current thread when manipulating these flags to ensure the flag updates are safe. This last change required some minor shuffling in a few filesystems to exclusively lock a brand new vnode slightly earlier. Reviewed by: kib MFC after: 3 days
Revision 1.246: download - view: text, markup, annotated - select for diffs
Thu Aug 12 08:35:24 2010 UTC (18 months ago) by kib
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +26 -8 lines
SVN rev 211212 on 2010-08-12 08:35:24Z by kib Softdep_process_worklist() should unsuspend not only before processing the worklist (in softdep_process_journal), but also after flushing the workitems. Might be, we should even do this before bwillwrite() too, but this seems to be not needed for now. Fs might be suspended during processing the queue, and then there is nobody around to unsuspend. In collaboration with: pho Tested by: bz Reviewed by: jeff
Revision 1.211.2.10: download - view: text, markup, annotated - select for diffs
Fri Jul 16 20:23:24 2010 UTC (18 months, 3 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.211.2.9: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.9: +6 -0 lines
SVN rev 210173 on 2010-07-16 20:23:24Z by jhb When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted into a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case. The softupdates code also toggles LK_NOSHARE in one function to close a race with snapshots. Fix this code to grab the interlock while fiddling with lk_flags.
Revision 1.245: download - view: text, markup, annotated - select for diffs
Tue Jul 6 07:11:04 2010 UTC (19 months ago) by jeff
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +8 -74 lines
SVN rev 209717 on 2010-07-06 07:11:04Z by jeff - Handle the truncation of an inode with an effective link count of 0 in the context of the process that reduced the effective count. Previously all truncation as a result of unlink happened in the softdep flush thread. This had the effect of being impossible to rate limit properly with the journal code. Now the process issuing unlinks is suspended when the journal files. This has a side-effect of improving rm performance by allowing more concurrent work. - Handle two cases in inactive, one for effnlink == 0 and another when nlink finally reaches 0. - Eliminate the SPACECOUNTED related code since the truncation is no longer delayed. Discussed with: mckusick
Revision 1.234.2.3.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.234.2.3: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.2.3: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.244: download - view: text, markup, annotated - select for diffs
Fri Jun 11 18:26:53 2010 UTC (20 months ago) by avg
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +6 -19 lines
SVN rev 209057 on 2010-06-11 18:26:53Z by avg ffs_softdep: change K&R in function defintions to ANSI prototypes Apparently it's bad when we first have an ANSI prototype in function declaration, but then use K&R in its defintion. Complaint from: clang MFC after: 2 weeks
Revision 1.243: download - view: text, markup, annotated - select for diffs
Wed May 19 06:18:01 2010 UTC (20 months, 3 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +24 -17 lines
SVN rev 208287 on 2010-05-19 06:18:01Z by jeff - Don't immediately re-run softdepflush if we didn't make any progress on the last iteration. This can lead to a deadlock when we have worklist items that cannot be immediately satisfied. Reported by: uqs, Dimitry Andric <dimitry@andric.com> - Remove some unnecessary debugging code and place some other under SUJ_DEBUG. - Examine the journal state in softdep_slowdown(). - Re-format some comments so I may more easily add flag descriptions.
Revision 1.242: download - view: text, markup, annotated - select for diffs
Fri May 7 08:45:21 2010 UTC (21 months ago) by jeff
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +2 -1 lines
SVN rev 207742 on 2010-05-07 08:45:21Z by jeff - Call softdep_prealloc() before any of the balloc routines in the snapshot code. - Don't fsync() vnodes in prealloc if copy on write is in progress. It is not safe to recurse back into the write path here. Reported by: Vladimir Grebenschikov <vova@fbsd.ru>
Revision 1.241: download - view: text, markup, annotated - select for diffs
Fri May 7 08:20:56 2010 UTC (21 months ago) by jeff
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +1 -1 lines
SVN rev 207741 on 2010-05-07 08:20:56Z by jeff - Use the correct flag mask when determining whether an inode has successfully made it to the free list yet or not. This fixes a deadlock that can occur with unlinked but referenced files. Journal space and inodedeps were not correctly reclaimed because the inode block was not left dirty. Tested/Reported by: lwindschuh@googlemail.com
Revision 1.240: download - view: text, markup, annotated - select for diffs
Wed Apr 28 07:57:37 2010 UTC (21 months, 2 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +2 -1 lines
SVN rev 207310 on 2010-04-28 07:57:37Z by jeff - When canceling jaddrefs they may not yet be in the journal if this is via a revert call. In this case don't attempt to remove something that has not yet been added. Otherwise this jaddref must hang around to prevent the bitmap write as normal.
Revision 1.239: download - view: text, markup, annotated - select for diffs
Wed Apr 28 07:26:41 2010 UTC (21 months, 2 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +171 -0 lines
SVN rev 207309 on 2010-04-28 07:26:41Z by jeff - Fix builds without SOFTUPDATES defined in the kernel config.
Revision 1.238: download - view: text, markup, annotated - select for diffs
Sat Apr 24 07:36:33 2010 UTC (21 months, 2 weeks ago) by pjd
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +2 -1 lines
SVN rev 207142 on 2010-04-24 07:36:33Z by pjd Fix build for UFS without SOFTUPDATES.
Revision 1.237: download - view: text, markup, annotated - select for diffs
Sat Apr 24 07:05:35 2010 UTC (21 months, 2 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +6324 -1242 lines
SVN rev 207141 on 2010-04-24 07:05:35Z by jeff - Merge soft-updates journaling from projects/suj/head into head. This brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm
Revision 1.211.2.9.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.211.2.9: preferred, colored; next MAIN 1.211.2.10: preferred, colored
Changes since revision 1.211.2.9: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.234.2.3.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.234.2.3: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.2.3: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.234.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 15 12:51:22 2009 UTC (2 years, 4 months ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP, RELENG_8_0_BP
Branch point for: RELENG_8_2, RELENG_8_1, RELENG_8_0
Diff to: previous 1.234.2.2: preferred, colored; branchpoint 1.234: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.2.2: +21 -5 lines
SVN rev 197222 on 2009-09-15 12:51:22Z by kib MFC r196888: The clear_remove() and clear_inodedeps() call vn_start_write(NULL, &mp, V_NOWAIT) on the non-busied mount point. Unmount might free ufs-specific mp data, causing ffs_vgetf() to access freed memory. Busy mountpoint before dropping softdep lk. Approved by: re (kensmith)
Revision 1.181.2.26: download - view: text, markup, annotated - select for diffs
Mon Sep 7 13:58:26 2009 UTC (2 years, 5 months ago) by kib
Branches: RELENG_6
Diff to: previous 1.181.2.25: preferred, colored; branchpoint 1.181: preferred, colored; next MAIN 1.182: preferred, colored
Changes since revision 1.181.2.25: +8 -1 lines
SVN rev 196925 on 2009-09-07 13:58:26Z by kib MFC r196206. Take the number of allocated freeblks into consideration for softdep_slowdown(). Tested by: pluknet gmail com
Revision 1.211.2.9: download - view: text, markup, annotated - select for diffs
Mon Sep 7 12:39:54 2009 UTC (2 years, 5 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.211.2.8: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.8: +8 -1 lines
SVN rev 196922 on 2009-09-07 12:39:54Z by kib MFC r196206. Take the number of allocated freeblks into consideration for softdep_slowdown().
Revision 1.236: download - view: text, markup, annotated - select for diffs
Sun Sep 6 11:46:51 2009 UTC (2 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +21 -5 lines
SVN rev 196888 on 2009-09-06 11:46:51Z by kib The clear_remove() and clear_inodedeps() call vn_start_write(NULL, &mp, V_NOWAIT) on the non-busied mount point. Unmount might free ufs-specific mp data, causing ffs_vgetf() to access freed memory. Busy mountpoint before dropping softdep lk. Noted and reviewed by: tegge Tested by: pho MFC after: 1 week
Revision 1.234.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 14 11:22:09 2009 UTC (2 years, 5 months ago) by kib
Branches: RELENG_8
Diff to: previous 1.234.2.1: preferred, colored; branchpoint 1.234: preferred, colored
Changes since revision 1.234.2.1: +8 -1 lines
SVN rev 196210 on 2009-08-14 11:22:09Z by kib MFC r196206: Take the number of allocated freeblks into consideration for softdep_slowdown(), to prevent kernel memory exhaustioni on mass-truncation. Approved by: re (rwatson)
Revision 1.235: download - view: text, markup, annotated - select for diffs
Fri Aug 14 11:00:38 2009 UTC (2 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +8 -1 lines
SVN rev 196206 on 2009-08-14 11:00:38Z by kib When a UFS node is truncated to the zero length, e.g. by explicit truncate(2) call, or by being removed or truncated on open, either new softupdate freeblks structure is allocated to track the freed blocks of the node, or truncation is done syncronously when too many SU dependencies are accumulated. The decision does not take into account the allocated freeblks dependencies, allowing workloads that do huge amount of truncations to exhaust the kernel memory. Take the number of allocated freeblks into consideration for softdep_slowdown(). Reported by: pluknet gmail com Diagnosed and tested by: pho Approved by: re (rwatson) MFC after: 1 month
Revision 1.234.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.234: download - view: text, markup, annotated - select for diffs
Thu Jul 2 18:02:55 2009 UTC (2 years, 7 months ago) by kib
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +2 -0 lines
SVN rev 195294 on 2009-07-02 18:02:55Z by kib In vn_vget_ino() and their inline equivalents, mnt_ref() the mount point around the sequence that drop vnode lock and then busies the mount point. Not having vlocked node or direct reference to the mp allows for the forced unmount to proceed, making mp unmounted or reused. Tested by: pho Reviewed by: jeff Approved by: re (kensmith) MFC after: 2 weeks
Revision 1.233: download - view: text, markup, annotated - select for diffs
Tue Jun 30 10:07:00 2009 UTC (2 years, 7 months ago) by kib
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +18 -0 lines
SVN rev 195186 on 2009-06-30 10:07:00Z by kib Softdep_fsync() may need to lock parent directory of the synced vnode. Use inlined (due to FFSV_FORCEINSMQ) version of vn_vget_ino() to prevent mountpoint from being unmounted and freed while no vnodes are locked. Tested by: pho Approved by: re (kensmith) MFC after: 1 month
Revision 1.232: download - view: text, markup, annotated - select for diffs
Tue Jun 2 13:03:35 2009 UTC (2 years, 8 months ago) by attilio
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +2 -2 lines
SVN rev 193307 on 2009-06-02 13:03:35Z by attilio Handle lock recursion differenty by always checking against LO_RECURSABLE instead the lock own flag itself. Tested by: pho
Revision 1.211.2.8: download - view: text, markup, annotated - select for diffs
Tue May 5 09:20:07 2009 UTC (2 years, 9 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.211.2.7: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.7: +1 -1 lines
SVN rev 191811 on 2009-05-05 09:20:07Z by kib MFC r190690: When removing or renaming snaphost, do not delve into request_cleanup(). The later may need blocks from the underlying device that belongs to normal files, that should not be locked while snap lock is held.
Revision 1.211.2.7.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.211.2.7: preferred, colored; next MAIN 1.211.2.8: preferred, colored
Changes since revision 1.211.2.7: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.231: download - view: text, markup, annotated - select for diffs
Sat Apr 4 12:19:52 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +1 -1 lines
SVN rev 190690 on 2009-04-04 12:19:52Z by kib When removing or renaming snaphost, do not delve into request_cleanup(). The later may need blocks from the underlying device that belongs to normal files, that should not be locked while snap lock is held. Reported and tested by: pho MFC after: 1 month
Revision 1.211.2.7: download - view: text, markup, annotated - select for diffs
Sat Feb 14 22:24:04 2009 UTC (2 years, 11 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.211.2.6: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.6: +30 -1 lines
SVN rev 188618 on 2009-02-14 22:24:04Z by kib MFC r183072: Add the ffs structures introspection functions for ddb. Show the b_dep value for the buffer in the show buffer command. Add a comand to dump the dirty/clean buffer list for vnode.
Revision 1.211.2.6: download - view: text, markup, annotated - select for diffs
Sat Feb 14 20:59:50 2009 UTC (2 years, 11 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.211.2.5: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.5: +42 -15 lines
SVN rev 188611 on 2009-02-14 20:59:50Z by kib MFC r182365: Softdep code may need to instantiate vnode when processing dependencies. In particular, it may need this while syncing filesystem being unmounted. Since during unmount MNTK_NOINSMNTQUE flag is set, that could sometimes disallow insertion of the vnode into the vnode mount list, softdep code needs to overwrite the MNTK_NOINSMNTQUE flag. Create the ffs_vgetf() function that sets the VV_FORCEINSMQ flag for new vnode and use it consistently from the softdep code instead of ffs_vget(). Add the retry logic to the softdep_flushfiles() to flush the vnodes that could be instantiated while flushing softdep dependencies.
Revision 1.211.2.5: download - view: text, markup, annotated - select for diffs
Thu Jan 29 11:21:15 2009 UTC (3 years ago) by kib
Branches: RELENG_7
Diff to: previous 1.211.2.4: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.4: +2 -1 lines
SVN rev 187891 on 2009-01-29 11:21:15Z by kib MFC r183067: The struct inode *ip supplied to softdep_freefile is not neccessary the inode having number ino. In r170991, the ip was marked IN_MODIFIED, that is not quite correct. Mark only the right inode modified by checking inode number.
Revision 1.211.2.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.211.2.4: preferred, colored; next MAIN 1.211.2.5: preferred, colored
Changes since revision 1.211.2.4: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.230: download - view: text, markup, annotated - select for diffs
Sun Nov 2 10:15:42 2008 UTC (3 years, 3 months ago) by attilio
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +1 -1 lines
SVN rev 184554 on 2008-11-02 10:15:42Z by attilio Improve VFS locking: - Implement real draining for vfs consumers by not relying on the mnt_lock and using instead a refcount in order to keep track of lock requesters. - Due to the change above, remove the mnt_lock lockmgr because it is now useless. - Due to the change above, vfs_busy() is no more linked to a lockmgr. Change so its KPI by removing the interlock argument and defining 2 new flags for it: MBF_NOWAIT which basically replaces the LK_NOWAIT of the old version (which was unlinked from the lockmgr alredy) and MBF_MNTLSTLOCK which provides the ability to drop the mountlist_mtx once the mnt interlock is held (ability still desired by most consumers). - The stub used into vfs_mount_destroy(), that allows to override the mnt_ref if running for more than 3 seconds, make it totally useless. Remove it as it was thought to work into older versions. If a problem of "refcount held never going away" should appear, we will need to fix properly instead than trust on such hackish solution. - Fix a bug where returning (with an error) from dounmount() was still leaving the MNTK_MWAIT flag on even if it the waiters were actually woken up. Just a place in vfs_mount_destroy() is left because it is going to recycle the structure in any case, so it doesn't matter. - Remove the markercnt refcount as it is useless. This patch modifies VFS ABI and breaks KPI for vfs_busy() so manpages and __FreeBSD_version will be modified accordingly. Discussed with: kib Tested by: pho
Revision 1.229: download - view: text, markup, annotated - select for diffs
Thu Oct 23 20:26:15 2008 UTC (3 years, 3 months ago) by des
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +4 -2 lines
SVN rev 184214 on 2008-10-23 20:26:15Z by des Fix a number of style issues in the MALLOC / FREE commit. I've tried to be careful not to fix anything that was already broken; the NFSv4 code is particularly bad in this respect.
Revision 1.228: download - view: text, markup, annotated - select for diffs
Thu Oct 23 15:53:51 2008 UTC (3 years, 3 months ago) by des
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +28 -30 lines
SVN rev 184205 on 2008-10-23 15:53:51Z by des Retire the MALLOC and FREE macros. They are an abomination unto style(9). MFC after: 3 months
Revision 1.181.2.25.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.181.2.25: preferred, colored; next MAIN 1.181.2.26: preferred, colored
Changes since revision 1.181.2.25: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.227: download - view: text, markup, annotated - select for diffs
Tue Sep 16 11:19:38 2008 UTC (3 years, 4 months ago) by kib
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +30 -1 lines
SVN rev 183072 on 2008-09-16 11:19:38Z by kib Add the ffs structures introspection functions for ddb. Show the b_dep value for the buffer in the show buffer command. Add a comand to dump the dirty/clean buffer list for vnode. Reviewed by: tegge Tested and used by: pho MFC after: 1 month
Revision 1.226: download - view: text, markup, annotated - select for diffs
Tue Sep 16 10:52:25 2008 UTC (3 years, 4 months ago) by kib
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +2 -1 lines
SVN rev 183067 on 2008-09-16 10:52:25Z by kib The struct inode *ip supplied to softdep_freefile is not neccessary the inode having number ino. In r170991, the ip was marked IN_MODIFIED, that is not quite correct. Mark only the right inode modified by checking inode number. Reviewed by: tegge In collaboration with: pho MFC after: 1 month
Revision 1.225: download - view: text, markup, annotated - select for diffs
Sun Aug 31 14:26:08 2008 UTC (3 years, 5 months ago) by attilio
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +2 -2 lines
SVN rev 182542 on 2008-08-31 14:26:08Z by attilio Decontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions. Manpages are updated accordingly. Tested by: Diego Sardina <siarodx at gmail dot com>
Revision 1.224: download - view: text, markup, annotated - select for diffs
Thu Aug 28 09:18:20 2008 UTC (3 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +42 -15 lines
SVN rev 182365 on 2008-08-28 09:18:20Z by kib Softdep code may need to instantiate vnode when processing dependencies. In particular, it may need this while syncing filesystem being unmounted. Since during unmount MNTK_NOINSMNTQUE flag is set, that could sometimes disallow insertion of the vnode into the vnode mount list, softdep code needs to overwrite the MNTK_NOINSMNTQUE flag. Create the ffs_vgetf() function that sets the VV_FORCEINSMQ flag for new vnode and use it consistently from the softdep code instead of ffs_vget(). Add the retry logic to the softdep_flushfiles() to flush the vnodes that could be instantiated while flushing softdep dependencies. Tested by: pho, kris Reviewed by: tegge MFC after: 1 month
Revision 1.211.2.4: download - view: text, markup, annotated - select for diffs
Tue Jul 22 14:27:47 2008 UTC (3 years, 6 months ago) by rwatson
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.211.2.3: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.3: +2 -1 lines
SVN rev 180695 on 2008-07-22 14:27:47Z by rwatson Merge r177253, r177255 from head to stable/7: In keeping with style(9)'s recommendations on macros, use a ';' after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. Discussed with: imp, rink The requirement to place a ; after each SYSINIT definition has not been MFC'd, as this might break the compile third-party modules, but merging the actual ; additions reduces diffs against 8.x making it easier to merge other changes.
Revision 1.181.2.25: download - view: text, markup, annotated - select for diffs
Sat May 17 12:46:24 2008 UTC (3 years, 8 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.181.2.24: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.24: +0 -8 lines
MFC the MPSAFE quotas. kern/vfs_syscalls.c rev. 1.433: Busy filesystem around call of VFS_QUOTACTL() vfs op. ufs/ffs/ffs_softdep.c remaining parts of the rev. 1.206 after 1.181.2.24: Replace unconditional acquision of Giant when QUOTAS are defined with VFS_LOCK_GIANT(NULL) call. ufs/ffs/ffs_vfsops.c rev. 1.327, 1.328 rev. 1.327: Implement fine-grained locking for UFS quotas. rev. 1.328: Mark UFS as being MP-Safe in "options QUOTA" case too. ufs/ufs/quota.h remaining parts of the rev. 1.30 after 1.27.2.3: Implement fine-grained locking for UFS quotas. ufs/ufs/ufs_lookup.c rev. 1.83: Call getinoquota() before allocating new block for the directory to properly account for block allocation. ufs/ufs/ufs_quota.c rev. 1.93: Implement fine-grained locking for UFS quotas. ufs/ufs/ufs_vnops.c rev. 1.289: Remove unneeded getinoquota() call in the ufs_access().
Revision 1.211.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 29 21:48:55 2008 UTC (3 years, 9 months ago) by cokane
Branches: RELENG_7
Diff to: previous 1.211.2.2: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.2: +15 -8 lines
MFC: revision 1.219 Replace the non-MPSAFE timeout(9) API in ffs_softdep.c with the MPSAFE callout_* API (e.g. callout_init_mtx(9)). This was one of the numerous items on the http://wiki.freebsd.org/SMPTODO list.
Revision 1.223: download - view: text, markup, annotated - select for diffs
Sun Apr 6 20:08:51 2008 UTC (3 years, 10 months ago) by attilio
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +2 -2 lines
Optimize lockmgr in order to get rid of the pool mutex interlock, of the state transitioning flags and of msleep(9) callings. Use, instead, an algorithm very similar to what sx(9) and rwlock(9) alredy do and direct accesses to the sleepqueue(9) primitive. In order to avoid writer starvation a mechanism very similar to what rwlock(9) uses now is implemented, with the correspective per-thread shared lockmgrs counter. This patch also adds 2 new functions to lockmgr KPI: lockmgr_rw() and lockmgr_args_rw(). These two are like the 2 "normal" versions, but they both accept a rwlock as interlock. In order to realize this, the general lockmgr manager function "__lockmgr_args()" has been implemented through the generic lock layer. It supports all the blocking primitives, but currently only these 2 mappers live. The patch drops the support for WITNESS atm, but it will be probabilly added soon. Also, there is a little race in the draining code which is also present in the current CVS stock implementation: if some sharers, once they wakeup, are in the runqueue they can contend the lock with the exclusive drainer. This is hard to be fixed but the now committed code mitigate this issue a lot better than the (past) CVS version. In addition assertive KA_HELD and KA_UNHELD have been made mute assertions because they are dangerous and they will be nomore supported soon. In order to avoid namespace pollution, stack.h is splitted into two parts: one which includes only the "struct stack" definition (_stack.h) and one defining the KPI. In this way, newly added _lockmgr.h can just include _stack.h. Kernel ABI results heavilly changed by this commit (the now committed version of "struct lock" is a lot smaller than the previous one) and KPI results broken by lockmgr_rw() / lockmgr_args_rw() introduction, so manpages and __FreeBSD_version will be updated accordingly. Tested by: kris, pho, jeff, danger Reviewed by: jeff Sponsored by: Google, Summer of Code program 2007
Revision 1.211.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 6 10:02:20 2008 UTC (3 years, 10 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.211.2.1: preferred, colored; branchpoint 1.211: preferred, colored
Changes since revision 1.211.2.1: +1 -0 lines
MFC rev. 1.277 of sys/kern/vfs_mount.c rev. 1.332 of sys/sys/vnode.h rev. 1.222 of sys/ufs/ffs/ffs_softdep.c Yield the cpu in the kernel while iterating the list of the vnodes belonging to the mountpoint. Also, yield when in the softdep_process_worklist() even when we are not going to sleep due to buffer drain.
Revision 1.222: download - view: text, markup, annotated - select for diffs
Sun Mar 23 13:45:24 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +1 -0 lines
Yield the cpu in the kernel while iterating the list of the vnodes belonging to the mountpoint. Also, yield when in the softdep_process_worklist() even when we are not going to sleep due to buffer drain. It is believed that the ULE fixed the problem [1], but the yielding seems to be needed at least for the 4BSD case. Discussed: on stable@, with bde Reviewed by: tegge, jeff [1] MFC after: 2 weeks
Revision 1.221: download - view: text, markup, annotated - select for diffs
Sat Mar 22 09:15:16 2008 UTC (3 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +65 -69 lines
- Complete part of the unfinished bufobj work by consistently using BO_LOCK/UNLOCK/MTX when manipulating the bufobj. - Create a new lock in the bufobj to lock bufobj fields independently. This leaves the vnode interlock as an 'identity' lock while the bufobj is an io lock. The bufobj lock is ordered before the vnode interlock and also before the mnt ilock. - Exploit this new lock order to simplify softdep_check_suspend(). - A few sync related functions are marked with a new XXX to note that we may not properly interlock against a non-zero bv_cnt when attempting to sync all vnodes on a mountlist. I do not believe this race is important. If I'm wrong this will make these locations easier to find. Reviewed by: kib (earlier diff) Tested by: kris, pho (earlier diff)
Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Mar 16 10:58:08 2008 UTC (3 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +2 -1 lines
In keeping with style(9)'s recommendations on macros, use a ';' after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
Revision 1.181.2.24: download - view: text, markup, annotated - select for diffs
Fri Mar 14 15:25:44 2008 UTC (3 years, 10 months ago) by emaste
Branches: RELENG_6
Diff to: previous 1.181.2.23: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.23: +4 -0 lines
Honour mpsafe_vfs=0 in softdep_flush. This is basically a MFC of revision 1.206, except that Giant remains unconditionally acquired in the #ifdef QUOTA case here (as QUOTA-enabled UFS on RELENG_6 is not MPSAFE). Reviewed by: kib
Revision 1.219: download - view: text, markup, annotated - select for diffs
Thu Mar 13 20:15:48 2008 UTC (3 years, 10 months ago) by cokane
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +15 -8 lines
Replace the non-MPSAFE timeout(9) API in ffs_softdep.c with the MPSAFE callout_* API (e.g. callout_init_mtx(9)). This was one of the numerous items on the http://wiki.freebsd.org/SMPTODO list. Reviewed by: imp, obrien, jhb MFC after: 1 week
Revision 1.181.2.23: download - view: text, markup, annotated - select for diffs
Tue Mar 11 15:14:31 2008 UTC (3 years, 11 months ago) by emaste
Branches: RELENG_6
Diff to: previous 1.181.2.22: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.22: +2 -2 lines
MFC minor cleanups: ffs_softdep.c 1.210 Add a newline to the printf message. ffs_softdep.c 1.214 (part) Update comment to match the DIAGNOSTIC -> INVARIANTS change.
Revision 1.218: download - view: text, markup, annotated - select for diffs
Mon Mar 10 18:44:07 2008 UTC (3 years, 11 months ago) by emaste
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +0 -1 lines
Remove include of opt_quota.h; as of revision 1.205 there is no longer any #ifdef QUOTA conditional code.
Revision 1.181.2.22: download - view: text, markup, annotated - select for diffs
Mon Feb 25 10:03:07 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_6
Diff to: previous 1.181.2.21: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.21: +1 -1 lines
MFC: fix spelling, sync comments, malloc type short descriptions, don't use function initializers in varible definitions, add GJOURNAL place holder
Revision 1.181.2.21: download - view: text, markup, annotated - select for diffs
Mon Feb 25 09:52:12 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_6
Diff to: previous 1.181.2.20: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.20: +33 -33 lines
MFC: use *_EMPTY macros when appropriate.
Revision 1.181.2.20: download - view: text, markup, annotated - select for diffs
Mon Feb 25 09:39:36 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_6
Diff to: previous 1.181.2.19: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.19: +1 -0 lines
MFC: fix livelock that could occur when snapshoting UFS with quotas.
(ffs_softdep.c rev 1.221 & ufs_inode.c rev 1.69)
Revision 1.181.2.19: download - view: text, markup, annotated - select for diffs
Mon Feb 25 09:30:00 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_6
Diff to: previous 1.181.2.18: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.18: +2 -2 lines
MFC: fix spelling, sync comments, malloc type short descriptions, don't use function initializers in varible definitions, add GJOURNAL place holder
Revision 1.181.2.18: download - view: text, markup, annotated - select for diffs
Mon Feb 25 06:30:23 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_6
Diff to: previous 1.181.2.17: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.17: +27 -24 lines
MFC: Turn most ffs 'DIAGNOSTIC's into INVARIANTS.
Revision 1.217: download - view: text, markup, annotated - select for diffs
Sun Feb 24 16:38:58 2008 UTC (3 years, 11 months ago) by attilio
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +6 -3 lines
Introduce some functions in the vnode locks namespace and in the ffs namespace in order to handle lockmgr fields in a controlled way instead than spreading all around bogus stubs: - VN_LOCK_AREC() allows lock recursion for a specified vnode - VN_LOCK_ASHARE() allows lock sharing for a specified vnode In FFS land: - BUF_AREC() allows lock recursion for a specified buffer lock - BUF_NOREC() disallows recursion for a specified buffer lock Side note: union_subr.c::unionfs_node_update() is the only other function directly handling lockmgr fields. As this is not simple to fix, it has been left behind as "sole" exception.
Revision 1.211.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 15 16:43:02 2008 UTC (3 years, 11 months ago) by obrien
Branches: RELENG_7
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +27 -24 lines
MFC: Turn most ffs 'DIAGNOSTIC's into INVARIANTS.
Revision 1.216: download - view: text, markup, annotated - select for diffs
Sun Jan 13 14:44:13 2008 UTC (4 years ago) by attilio
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +2 -2 lines
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary. KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed. Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
Revision 1.215: download - view: text, markup, annotated - select for diffs
Thu Jan 10 01:10:56 2008 UTC (4 years, 1 month ago) by attilio
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +2 -2 lines
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
Revision 1.214: download - view: text, markup, annotated - select for diffs
Fri Nov 9 11:04:36 2007 UTC (4 years, 3 months ago) by ru
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +9 -3 lines
Fix build without INVARIANTS and update a comment to match a change made in previous revision.
Revision 1.213: download - view: text, markup, annotated - select for diffs
Thu Nov 8 17:21:50 2007 UTC (4 years, 3 months ago) by obrien
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +19 -22 lines
Turn most ffs 'DIAGNOSTIC's into INVARIANTS.
Revision 1.212: download - view: text, markup, annotated - select for diffs
Sat Oct 20 23:23:23 2007 UTC (4 years, 3 months ago) by julian
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +1 -1 lines
Rename the kthread_xxx (e.g. kthread_create()) calls to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
Revision 1.211: download - view: text, markup, annotated - select for diffs
Fri Jun 22 13:22:36 2007 UTC (4 years, 7 months ago) by kib
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +1 -0 lines
Fix livelock that could occur when snapshoting UFS with quotas, where some quota limit was exceeded. Sequence of UFS_VALLOC()/UFS_VFREE() call there could cause inodeblock to have both freefile and inodedep dependencies without any inode in the block being marked for write. Then, softdep_check_suspend() would return EAGAIN forewer. Force write of inodeblock with allocated freefile softdependency by setting IN_MODIFIED flag in softdep_freefile and unconditionally calling UFS_UPDATE() in ufs_reclaim. Reported by: kris Debug help and tested by: Peter Holm Approved by: re (kensmith) MFC after: 3 weeks
Revision 1.210: download - view: text, markup, annotated - select for diffs
Thu May 3 22:39:52 2007 UTC (4 years, 9 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +1 -1 lines
Add a newline to the printf message.
Revision 1.181.2.17: download - view: text, markup, annotated - select for diffs
Tue Apr 24 11:06:12 2007 UTC (4 years, 9 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Diff to: previous 1.181.2.16: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.16: +4 -1 lines
MFC rev. 1.208: When LK_NOWAIT is passed as argument to process_worklist_item(), this does not prevent handle_workitem_remove() from recursing into a blocking version. Add the dirrem to worklist instead of processing it now if this is the case.
Revision 1.181.2.16: download - view: text, markup, annotated - select for diffs
Tue Apr 24 11:03:26 2007 UTC (4 years, 9 months ago) by kib
Branches: RELENG_6
Diff to: previous 1.181.2.15: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.15: +26 -5 lines
MFC rev. 1.209: Recalculate the NEWBLOCK flag for pagedep structure after the softdep lock is dropped, since pagedep may be already processed and deallocated.
Revision 1.209: download - view: text, markup, annotated - select for diffs
Tue Apr 10 09:30:41 2007 UTC (4 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +26 -5 lines
Recalculate the NEWBLOCK flag for pagedep structure after the softdep lock is dropped, since pagedep may be already processed and deallocated. Found and tested by: kris MFC after: 2 weeks
Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Apr 10 09:28:17 2007 UTC (4 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +4 -1 lines
When LK_NOWAIT is passed as argument to process_worklist_item(), this does not prevent handle_workitem_remove() from recursing into a blocking version. Add the dirrem to worklist instead of processing it now if this is the case. Reported and tested by: kris Submitted by: tegge MFC after: 2 weeks
Revision 1.207: download - view: text, markup, annotated - select for diffs
Wed Apr 4 07:29:53 2007 UTC (4 years, 10 months ago) by delphij
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +33 -33 lines
Use *_EMPTY macros when appropriate.
Revision 1.206: download - view: text, markup, annotated - select for diffs
Thu Mar 29 08:26:04 2007 UTC (4 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +5 -0 lines
Revert rev. 1.205. Replace unconditional acquision of Giant when QUOTAS are defined with VFS_LOCK_GIANT(NULL) call. This shall fix softdep operation when mpsafe_vfs = 0. Reported and tested by: kris Submitted by: tegge MFC after: 1 week
Revision 1.205: download - view: text, markup, annotated - select for diffs
Tue Mar 20 10:51:45 2007 UTC (4 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +0 -9 lines
Mark UFS as being MP-Safe in "options QUOTA" case too. Remove no more neccessary Giant acquisions in softdepend processing code. Tested by: Peter Holm Reviewed by: tegge Approved by: re (kensmith)
Revision 1.181.2.15: download - view: text, markup, annotated - select for diffs
Mon Mar 19 18:56:40 2007 UTC (4 years, 10 months ago) by brian
Branches: RELENG_6
Diff to: previous 1.181.2.14: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.14: +4 -4 lines
MFC: Account for di_blocks allocations when IN_SPACECOUNTED is set in an
inode's i_flag. This fixes an eventual df/du discrepency resulting
from fs_pendingblocks being reduced to less than zero.
Revision 1.204: download - view: text, markup, annotated - select for diffs
Fri Feb 23 20:23:35 2007 UTC (4 years, 11 months ago) by brian
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +4 -4 lines
Account for di_blocks allocations when IN_SPACECOUNTED is set in an
inode's i_flag.
It's possible that after ufs_infactive() calls softdep_releasefile(),
i_nlink stays >0 for a considerable amount of time (> 60 seconds here).
During this period, any ffs allocation routines that alter di_blocks
must also account for the blocks in the filesystem's fs_pendingblocks
value.
This change fixes an eventual df/du discrepency that will happen as
the result of fs_pendingblocks being reduced to <0.
The only manifestation of this that people may recognise is the
following message on boot:
/somefs: update error: blocks -N files M
at which point the negative pending block count is adjusted to zero.
Reviewed by: tegge
MFC after: 3 weeks
Revision 1.203: download - view: text, markup, annotated - select for diffs
Sat Feb 17 08:25:43 2007 UTC (4 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +0 -0 lines
This README file is obsolete. The cited problems were fixed long ago and the code is installed by default so no longer requires action by the administrator to be included.
Revision 1.181.2.14: download - view: text, markup, annotated - select for diffs
Sat Nov 4 01:45:50 2006 UTC (5 years, 3 months ago) by trhodes
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.181.2.13: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.13: +2 -1 lines
MFC 1.197: Provide a less cryptic panic message in place of just "found inode." Approved by: re (hrs)
Revision 1.181.2.13: download - view: text, markup, annotated - select for diffs
Fri Nov 3 11:43:47 2006 UTC (5 years, 3 months ago) by kib
Branches: RELENG_6
Diff to: previous 1.181.2.12: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.12: +7 -0 lines
MFC rev. 1.202: Aquire Giant in the softdep_flush for clear_remove() and clear_inodedeps() processing when QUOTA is set. Approved by: re (hrs)
Revision 1.202: download - view: text, markup, annotated - select for diffs
Wed Nov 1 13:48:44 2006 UTC (5 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +7 -0 lines
Aquire Giant in the softdep_flush for clear_remove() and clear_inodedeps() processing when QUOTA is set. Reported and tested by: Peter Holm Reviewed by: tegge MFC after: 3 days
Revision 1.181.2.12: download - view: text, markup, annotated - select for diffs
Mon Oct 9 19:56:37 2006 UTC (5 years, 4 months ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.11: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.11: +1 -2 lines
MFC: Reduce fluctuations of mnt_flag to allow unlocked readers to get a
slightly more consistent view.
Approved by: re (kensmith)
Revision 1.181.2.11: download - view: text, markup, annotated - select for diffs
Mon Oct 9 19:47:17 2006 UTC (5 years, 4 months ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.10: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.10: +2 -0 lines
MFC: Use mount interlock to protect all changes to mnt_flag and
mnt_kern_flag. This eliminates a race where MNT_UPDATE flag could be
lost when nmount() raced against sync(), sync_fsync() or quotactl().
Approved by: re (kensmith)
Revision 1.181.2.10: download - view: text, markup, annotated - select for diffs
Fri Oct 6 05:06:58 2006 UTC (5 years, 4 months ago) by kib
Branches: RELENG_6
Diff to: previous 1.181.2.9: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.9: +3 -2 lines
MFC rev. 1.198: Fix the glitch introduced in rev. 1.93. In softdep_sync_metadata(), switch by worklist type contains two for() loops, for D_INDIRDEP and D_PAGEDEP. On error, these loops are exited by break, where the switch actually shall be leaved. Use goto instead of break to reach the error handling code. Approved by: re (kensmith), pjd (mentor)
Revision 1.201: download - view: text, markup, annotated - select for diffs
Tue Sep 26 04:20:09 2006 UTC (5 years, 4 months ago) by tegge
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +1 -2 lines
Reduce fluctuations of mnt_flag to allow unlocked readers to get a slightly more consistent view.
Revision 1.200: download - view: text, markup, annotated - select for diffs
Tue Sep 26 04:17:17 2006 UTC (5 years, 4 months ago) by tegge
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +5 -0 lines
Increase mnt_noasync once in softdep_mount() to disallow async io, closing a window where a file system using softupdates could be async for a short while if both MNT_UPDATE and MNT_ASYNC were passed as flags to nmount(). Add MNTK_SOFTDEP flag to ensure that softdep_mount() doesn't increase mnt_noasync multiple times.
Revision 1.199: download - view: text, markup, annotated - select for diffs
Tue Sep 26 04:12:48 2006 UTC (5 years, 4 months ago) by tegge
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +2 -0 lines
Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag. This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Sep 20 07:49:28 2006 UTC (5 years, 4 months ago) by kib
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +3 -2 lines
Fix the glitch introduced in rev. 1.93. In softdep_sync_metadata(), switch by worklist type contains two for() loops, for D_INDIRDEP and D_PAGEDEP. On error, these loops are exited by break, where the switch actually shall be leaved. Use goto instead of break to reach the error handling code. Reported by: Peter Holm Reviewed by: tegge Approved by: pjd (mentor) MFC after: 2 weeks
Revision 1.197: download - view: text, markup, annotated - select for diffs
Tue May 16 18:51:22 2006 UTC (5 years, 8 months ago) by trhodes
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +2 -1 lines
Provide a less cryptic panic message in place of just "found inode."
Revision 1.181.2.9: download - view: text, markup, annotated - select for diffs
Sun May 14 00:55:20 2006 UTC (5 years, 9 months ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.8: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.8: +46 -0 lines
MFC: Try harder to flush first block of new subdirectory to get rid of
MKDIR_BODY dependency.
Revision 1.196: download - view: text, markup, annotated - select for diffs
Sat May 6 20:51:31 2006 UTC (5 years, 9 months ago) by tegge
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +46 -0 lines
ffs_syncvnode() might skip some of the blocks due to them being locked, assuming them to be inflight write buffers. This is not always the case. bufdaemon might hold the buffer lock and give up writing the buffer due to it having dependencies, the file system being suspended or the vnode lock being held by another thread. When bufdaemon decides to write the buffer there is still a window before bufobj_wref() has been called, allowing other threads to believe that the vnode has no dirty buffers or inflight writes. Try harder to flush first block of new subdirectory to get rid of MKDIR_BODY dependency.
Revision 1.195: download - view: text, markup, annotated - select for diffs
Mon Apr 17 07:43:56 2006 UTC (5 years, 9 months ago) by kensmith
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +1 -1 lines
Fix panic() message to give the right function name.
Revision 1.181.2.8: download - view: text, markup, annotated - select for diffs
Tue Apr 4 18:14:30 2006 UTC (5 years, 10 months ago) by tegge
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.181.2.7: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.7: +6 -1 lines
MFC: Eliminate softdep_flush() livelock by accounting for number of worklist
items marked as being in progress.
Approved by: re (hrs)
Revision 1.194: download - view: text, markup, annotated - select for diffs
Mon Apr 3 22:23:23 2006 UTC (5 years, 10 months ago) by tegge
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +6 -1 lines
Eliminate softdep_flush() livelock by accounting for number of worklist items marked as being in progress.
Revision 1.181.2.7: download - view: text, markup, annotated - select for diffs
Mon Mar 13 03:07:48 2006 UTC (5 years, 11 months ago) by jeff
Branches: RELENG_6
Diff to: previous 1.181.2.6: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.6: +478 -255 lines
MFC Revs 1.192, 1.191, 1.190, 1.189 VFS SMP fixes, stack api, softupdates fixes. Sponsored by: Isilon Systems, Inc. Approved by: re (scottl)
Revision 1.193: download - view: text, markup, annotated - select for diffs
Sun Mar 12 05:25:16 2006 UTC (5 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +0 -0 lines
- Force commit to give this the correct message; Lock giant when required in softdep_flush(). Found by: kris Sponsored by: Isilon Systems, Inc.
Revision 1.192: download - view: text, markup, annotated - select for diffs
Sun Mar 12 05:24:14 2006 UTC (5 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +3 -0 lines
- Remove the call to softdep_waitidle after suspending the filesystem. This does not do what I wanted as all dirty buffers must be flushed by the call to ffs_sync and any remaining dependency work would mean that this failed. Pointed out by: tegge
Revision 1.191: download - view: text, markup, annotated - select for diffs
Wed Mar 8 23:43:39 2006 UTC (5 years, 11 months ago) by tegge
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +158 -1 lines
Use vn_start_secondary_write() and vn_finished_secondary_write() as a replacement for vn_write_suspend_wait() to better account for secondary write processing. Close race where secondary writes could be started after ffs_sync() returned but before the file system was marked as suspended. Detect if secondary writes or softdep processing occurred during vnode sync loop in ffs_sync() and retry the loop if needed.
Revision 1.190: download - view: text, markup, annotated - select for diffs
Thu Mar 2 08:52:53 2006 UTC (5 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +7 -3 lines
- Acquire lk in softdep_slowdown so that it's owned when we call softdep_speedup(). - Assert that lk is held in softdep_speedup() rather than acquiring it. This avoids a potential lock recursion.
Revision 1.189: download - view: text, markup, annotated - select for diffs
Thu Mar 2 05:50:23 2006 UTC (5 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +313 -254 lines
- Move softdep from using a global worklist to per-mount worklists. This has many positive effects including improved smp locking, reducing interdependencies between mounts that can lead to deadlocks, etc. - Add the softdep worklist and various counters to the ufsmnt structure. - Add a mount pointer to the workitem and remove mount pointers from the various structures derived from the workitem as they are now redundant. - Remove the poor-man's semaphore protecting softdep_process_worklist and softdep_flushworklist. Several threads may now process the list simultaneously. - Add softdep_waitidle() to block the thread until all pending dependencies being operated on by other threads have been flushed. - Use softdep_waitidle() in unmount and snapshots to block either operation until the fs is stable. - Remove softdep worklist processing from the syncer and move it into the softdep_flush() thread. This thread processes all softdep mounts once each second and when it is called via the new softdep_speedup() when there is a resource shortage. This removes the softdep hook from the kernel and various hacks in header files to support it. Reviewed by/Discussed with: tegge, truckman, mckusick Tested by: kris
Revision 1.181.2.6: download - view: text, markup, annotated - select for diffs
Sat Jan 14 01:09:10 2006 UTC (6 years ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.5: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.5: +13 -0 lines
MFC: Close race where wakeup after background write could be lost.
Revision 1.181.2.5: download - view: text, markup, annotated - select for diffs
Sat Jan 14 01:07:14 2006 UTC (6 years ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.4: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.4: +19 -1 lines
MFC: Broaden scope of softdep_worklist_busy rwlock protection.
Revision 1.188: download - view: text, markup, annotated - select for diffs
Mon Jan 9 19:32:21 2006 UTC (6 years, 1 month ago) by tegge
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +13 -0 lines
If the lock passed to getdirtybuf() is the softdep lock then the background write completed wakeup could be missed. Close the race by grabbing the lock normally used for protection of bp->b_xflags. Reviewed by: truckman
Revision 1.187: download - view: text, markup, annotated - select for diffs
Mon Jan 9 19:16:56 2006 UTC (6 years, 1 month ago) by tegge
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +19 -1 lines
Broaden scope of softdep_worklist_busy rwlock protection of softdep processing to avoid some dependencies being missed by softdep_flushworklist(). Reviewed by: truckman
Revision 1.186: download - view: text, markup, annotated - select for diffs
Fri Dec 23 15:50:57 2005 UTC (6 years, 1 month ago) by delphij
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +1 -1 lines
Typo.
Revision 1.156.2.7: download - view: text, markup, annotated - select for diffs
Sat Oct 8 05:57:40 2005 UTC (6 years, 4 months ago) by truckman
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.156.2.6: preferred, colored; branchpoint 1.156: preferred, colored; next MAIN 1.157: preferred, colored
Changes since revision 1.156.2.6: +2 -0 lines
MFC ffs_softdep.c 1.185 - Schedule update of parent directory's link count
after rmdir()
Original commit message:
truckman 2005-09-29 21:50:26 UTC
FreeBSD src repository
Modified files:
sys/ufs/ffs ffs_softdep.c
Log:
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count. This will force the update of
the parent directory's actual link to actually be scheduled. Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely. ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed. This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.
This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree. It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.
Submitted by: tegge
MFC after: 3 days
Revision Changes Path
1.185 +2 -0 src/sys/ufs/ffs/ffs_softdep.c
Submitted by: tegge
Revision 1.181.2.4: download - view: text, markup, annotated - select for diffs
Sun Oct 2 08:25:33 2005 UTC (6 years, 4 months ago) by truckman
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.181.2.3: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.3: +2 -0 lines
MFC ffs_softdep.c 1.185
Original commit message:
truckman 2005-09-29 21:50:26 UTC
FreeBSD src repository
Modified files:
sys/ufs/ffs ffs_softdep.c
Log:
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count. This will force the update of
the parent directory's actual link to actually be scheduled. Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely. ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed. This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.
This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree. It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.
Submitted by: tegge
MFC after: 3 days
Revision Changes Path
1.185 +2 -0 src/sys/ufs/ffs/ffs_softdep.c
Submitted by: tegge
Approved by: re (scottl)
Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Sep 29 21:50:26 2005 UTC (6 years, 4 months ago) by truckman
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +2 -0 lines
After a rmdir()ed directory has been truncated, force an update of the directory's inode after queuing the dirrem that will decrement the parent directory's link count. This will force the update of the parent directory's actual link to actually be scheduled. Without this change the parent directory's actual link count would not be updated until ufs_inactive() cleared the inode of the newly removed directory, which might be deferred indefinitely. ufs_inactive() will not be called as long as any process holds a reference to the removed directory, and ufs_inactive() will not clear the inode if the link count is non-zero, which could be the result of an earlier system crash. If a background fsck is run before the update of the parent directory's actual link count has been performed, or at least scheduled by putting the dirrem on the leaf directory's inodedep id_bufwait list, fsck will corrupt the file system by decrementing the parent directory's effective link count, which was previously correct because it already took the removal of the leaf directory into account, and setting the actual link count to the same value as the effective link count after the dangling, removed, leaf directory has been removed. This happens because fsck acts based on the actual link count, which will be too high when fsck creates the file system snapshot that it references. This change has the fortunate side effect of more quickly cleaning up the large number dirrem structures that linger for an extended time after the removal of a large directory tree. It also fixes a potential problem with the shutdown of the syncer thread timing out if the system is rebooted immediately after removing a large directory tree. Submitted by: tegge MFC after: 3 days
Revision 1.57.2.16: download - view: text, markup, annotated - select for diffs
Tue Sep 20 22:37:54 2005 UTC (6 years, 4 months ago) by tegge
Branches: RELENG_4
Diff to: previous 1.57.2.15: preferred, colored; branchpoint 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57.2.15: +35 -3 lines
MFC: Retain generation count when writing zeroes instead of an inode to disk.
Don't free a struct inodedep if another process is allocating saved
inode memory for the same struct inodedep in
initiate_write_inodeblock().
Handle disappearing dependencies in softdep_disk_io_initiation().
Revision 1.156.2.6: download - view: text, markup, annotated - select for diffs
Tue Sep 20 22:36:32 2005 UTC (6 years, 4 months ago) by tegge
Branches: RELENG_5
Diff to: previous 1.156.2.5: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.5: +36 -3 lines
MFC: Retain generation count when writing zeroes instead of an inode to disk.
Don't free a struct inodedep if another process is allocating saved
inode memory for the same struct inodedep in
initiate_write_inodeblock_ufs[12]().
Handle disappearing dependencies in softdep_disk_io_initiation().
Revision 1.181.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 7 00:03:38 2005 UTC (6 years, 5 months ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.2: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.2: +42 -4 lines
MFC: Retain generation count when writing zeroes instead of an inode to disk.
Don't free a struct inodedep if another process is allocating saved
inode memory for the same struct inodedep in
initiate_write_inodeblock_ufs[12]().
Handle disappearing dependencies in softdep_disk_io_initiation().
Approved by: re (scottl)
Revision 1.184: download - view: text, markup, annotated - select for diffs
Mon Sep 5 22:14:33 2005 UTC (6 years, 5 months ago) by tegge
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +42 -4 lines
Retain generation count when writing zeroes instead of an inode to disk. Don't free a struct inodedep if another process is allocating saved inode memory for the same struct inodedep in initiate_write_inodeblock_ufs[12](). Handle disappearing dependencies in softdep_disk_io_initiation(). Reviewed by: mckusick
Revision 1.57.2.15: download - view: text, markup, annotated - select for diffs
Wed Aug 31 17:53:53 2005 UTC (6 years, 5 months ago) by ups
Branches: RELENG_4
Diff to: previous 1.57.2.14: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.14: +19 -0 lines
MFC ffs_softdep.c 1.182, softdep.h 1.18 Delay freeing disk space for file system blocks until all dirty buffers are safely released. This fixes softdep problems on truncation (deletion) of files with dirty buffers.
Revision 1.181.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 27 18:40:06 2005 UTC (6 years, 5 months ago) by tegge
Branches: RELENG_6
Diff to: previous 1.181.2.1: preferred, colored; branchpoint 1.181: preferred, colored
Changes since revision 1.181.2.1: +1 -1 lines
MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
Approved by: re (scottl)
Revision 1.34.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 26 20:40:31 2005 UTC (6 years, 5 months ago) by tegge
Branches: RELENG_3
Diff to: previous 1.34.2.4: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.2.4: +2 -2 lines
MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
Revision 1.57.2.14: download - view: text, markup, annotated - select for diffs
Fri Aug 26 20:40:14 2005 UTC (6 years, 5 months ago) by tegge
Branches: RELENG_4
Diff to: previous 1.57.2.13: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.13: +1 -1 lines
MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
Revision 1.156.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 26 20:39:51 2005 UTC (6 years, 5 months ago) by tegge
Branches: RELENG_5
Diff to: previous 1.156.2.4: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.4: +1 -1 lines
MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
Revision 1.183: download - view: text, markup, annotated - select for diffs
Sun Aug 21 18:19:06 2005 UTC (6 years, 5 months ago) by tegge
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +1 -1 lines
Don't set the COMPLETE flag in an inodedep structure before the related inode has been written.
Revision 1.156.2.4: download - view: text, markup, annotated - select for diffs
Wed Aug 10 15:22:17 2005 UTC (6 years, 6 months ago) by ups
Branches: RELENG_5
Diff to: previous 1.156.2.3: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.3: +19 -0 lines
MFC ffs_softdep.c 1.182, softdep.h 1.18 Delay freeing disk space for file system blocks until all dirty buffers are safely released. This fixes softdep problems on truncation (deletion) of files with dirty buffers.
Revision 1.181.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 10 14:09:25 2005 UTC (6 years, 6 months ago) by ups
Branches: RELENG_6
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +19 -0 lines
MFC ffs_softdep.c 1.182, softdep.h 1.18 Delay freeing disk space for file system blocks until all dirty buffers are safely released. This fixes softdep problems on truncation (deletion) of files with dirty buffers. Approved by: re (kensmith)
Revision 1.182: download - view: text, markup, annotated - select for diffs
Sun Jul 31 20:24:14 2005 UTC (6 years, 6 months ago) by ups
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +19 -0 lines
Delay freeing disk space for file system blocks until all dirty buffers are safely released. This fixes softdep problems on truncation (deletion) of files with dirty buffers. Reviewed by: jeff@, mckusick@, ps@, tegge@ Tested by: glebius@, ps@ MFC after: 3 weeks
Revision 1.181: download - view: text, markup, annotated - select for diffs
Tue May 3 11:03:29 2005 UTC (6 years, 9 months ago) by jeff
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +7 -11 lines
- Don't restrict the softdep stats to DEBUG kernels, they cost nothing to export. This was happening anyway since this file manually sets DEBUG. - Add a sysctl for the number of items on the worklist. - Use a more canonical loop restart in softdep_fsync_mountdev, it saves some code at the expense of a goto and makes me worry less about modifying a variable that should be private to the TAILQ_FOREACH_SAFE macro.
Revision 1.180: download - view: text, markup, annotated - select for diffs
Sun Apr 3 10:29:55 2005 UTC (6 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +0 -29 lines
- Move the contents of softdep_disk_prewrite into ffs_geom_strategy to fix two bugs. - ffs_disk_prewrite was pulling the vp from the buf and checking for COPYONWRITE, when really it wanted the vp from the bufobj that we're writing to, which is the devvp. This lead to us skipping the copy on write to all file data, which significantly broke snapshots for the last few months. - When the SOFTUPDATES option was not included in the kernel config we would also skip the copy on write check, which would effectively disable snapshots. - Remove an invalid mp_fixme(). Debugging tips from: mckusick Reported by: iedowse, others Discussed with: phk
Revision 1.156.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 29 07:24:50 2005 UTC (6 years, 10 months ago) by das
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.156.2.2: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.2: +5 -2 lines
MFC proc.h,v 1.422 ffs_softdep.c,v 1.179: Avoid recursively processing the worklist. Approved by: re
Revision 1.179: download - view: text, markup, annotated - select for diffs
Fri Mar 25 17:30:31 2005 UTC (6 years, 10 months ago) by das
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +5 -2 lines
When the softupdates worklist gets too long, threads that attempt to add more work are forced to process two worklist items first. However, processing an item may generate additional work, causing the unlucky thread to recursively process the worklist. Add a per-thread flag to detect this situation and avoid the recursion. This should fix the stack overflows that could occur while removing large directory trees. Tested by: kris Reviewed by: mckusick
Revision 1.178: download - view: text, markup, annotated - select for diffs
Sun Mar 13 12:01:50 2005 UTC (6 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +1 -1 lines
- The VI_DOOMED flag now signals the end of a vnode's relationship with the filesystem. Check that rather than VI_XLOCK. Sponsored by: Isilon Systems, Inc.
Revision 1.156.2.2: download - view: text, markup, annotated - select for diffs
Mon Feb 28 16:04:52 2005 UTC (6 years, 11 months ago) by delphij
Branches: RELENG_5
Diff to: previous 1.156.2.1: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.1: +12 -3 lines
MFC: Transferr the responsibility of recomputation of the superblock summary to background fsck. This will improve startup speed when mounting a large volume. Original commit log: The recomputation of file system summary at mount time can be a very slow process, especially for large file systems that is just recovered from a crash. Since the summary is already re-sync'ed every 30 second, we will not lag behind too much after a crash. With this consideration in mind, it is more reasonable to transfer the responsibility to background fsck, to reduce the delay after a crash. Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to control this behavior. When set to nonzero, we will get the "old" behavior, that the summary is computed immediately at mount time. Add five new sysctl variables to adjust ndir, nbfree, nifree, nffree and numclusters respectively. Teach fsck_ffs about these API, however, intentionally not to check the existence, since kernels without these sysctls must have recomputed the summary and hence no adjustments are necessary. This change has eliminated the usual tens of minutes of delay of mounting large dirty volumes. Reviewed by: mckusick Revision Changes Path 1.35 +5 -0 src/sbin/fsck_ffs/fsck.h 1.41 +55 -0 src/sbin/fsck_ffs/pass5.c 1.132 +68 -1 src/sys/ufs/ffs/ffs_alloc.c 1.176 +12 -3 src/sys/ufs/ffs/ffs_softdep.c 1.48 +6 -1 src/sys/ufs/ffs/fs.h
Revision 1.177: download - view: text, markup, annotated - select for diffs
Tue Feb 22 23:56:42 2005 UTC (6 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +2 -0 lines
- Add VOP locking asserts in several functions that have been implicated in recent deadlocks.
Revision 1.176: download - view: text, markup, annotated - select for diffs
Sun Feb 20 08:02:15 2005 UTC (6 years, 11 months ago) by delphij
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +12 -3 lines
The recomputation of file system summary at mount time can be a very slow process, especially for large file systems that is just recovered from a crash. Since the summary is already re-sync'ed every 30 second, we will not lag behind too much after a crash. With this consideration in mind, it is more reasonable to transfer the responsibility to background fsck, to reduce the delay after a crash. Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to control this behavior. When set to nonzero, we will get the "old" behavior, that the summary is computed immediately at mount time. Add five new sysctl variables to adjust ndir, nbfree, nifree, nffree and numclusters respectively. Teach fsck_ffs about these API, however, intentionally not to check the existence, since kernels without these sysctls must have recomputed the summary and hence no adjustments are necessary. This change has eliminated the usual tens of minutes of delay of mounting large dirty volumes. Reviewed by: mckusick MFC After: 1 week
Revision 1.175: download - view: text, markup, annotated - select for diffs
Fri Feb 11 08:13:31 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +269 -0 lines
Make non-SOFTUPDATES kernels compile again. Integrate the stubfile into the main file now that license issues have been long resolved.
Revision 1.174: download - view: text, markup, annotated - select for diffs
Wed Feb 9 12:22:16 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +3 -4 lines
style polishing.
Revision 1.173: download - view: text, markup, annotated - select for diffs
Tue Feb 8 20:51:00 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +1 -1 lines
Use ffs_truncate() directly instead of UFS_TRUNCATE()
Revision 1.172: download - view: text, markup, annotated - select for diffs
Tue Feb 8 20:29:10 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +1 -3 lines
Background writes are entirely an FFS/Softupdates thing. Give FFS vnodes a specific bufwrite method which contains all the background write stuff and then calls into the default bufwrite() for the rest of the job. Remove all the background write related stuff from the normal bufwrite. This drags the softdep_move_dependencies() back into FFS. Long term, it is worth looking at simply copying the data into allocated memory and issuing the bio directly and not create the "shadow buf" in the first place (just like copy-on-write is done in snapshots for instance). I don't think we really gain anything but complexity from doing this with a buf.
Revision 1.171: download - view: text, markup, annotated - select for diffs
Tue Feb 8 18:09:10 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +0 -2 lines
Drag another softupdates tentacle back into FFS: Now that FFS's vop_fsync is separate from the internal use we can do the full job there.
Revision 1.170: download - view: text, markup, annotated - select for diffs
Tue Feb 8 17:40:01 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +13 -13 lines
Don't use the UFS_* and VFS_* functions where a direct call is possble. The UFS_ functions are for UFS to call back into VFS. The VFS functions are external entry points into the filesystem.
Revision 1.169: download - view: text, markup, annotated - select for diffs
Tue Feb 8 17:23:39 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +0 -0 lines
(forced commit to record correct commit message) Split ffs_fsync() into a VOP_FSYNC() component and an internal part called ffs_syncvnode(). Eliminate unnecessary thread argument and XXX'ed curthread passes for same. Reduce softdep_sync_metadata() from a struct vop_fsync_args to just the vnode argument it needs. Convert internal VOP_FSYNC() calls to use ffs_syncvnode().
Revision 1.168: download - view: text, markup, annotated - select for diffs
Tue Feb 8 16:25:50 2005 UTC (7 years ago) by phk
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +9 -17 lines
For snapshots we need all VOP_LOCKs to be exclusive. The "business class upgrade" was implemented in UFS's VOP_LOCK implementation ufs_lock() which is the wrong layer, so move it to ffs_lock(). Also, as long as we have not abandonned advanced vfs-stacking we should not preclude it from happening: instead of implementing a copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at vop_stdlock() at the bottom.
Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Feb 2 20:30:47 2005 UTC (7 years ago) by jeff
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +5 -4 lines
- Use a seperate malloc tag for saved inode contents to help in debugging memory modified after free errors. Sponsored by: Isilon Systems, Inc.
Revision 1.156.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:26:59 2005 UTC (7 years ago) by imp
Branches: RELENG_5
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +1 -1 lines
MFC: /*- and related license changes
Revision 1.166: download - view: text, markup, annotated - select for diffs
Mon Jan 24 10:18:31 2005 UTC (7 years ago) by jeff
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +455 -739 lines
- Convert the global LK lock to a mutex. - Expand the scope of lk to cover not only interrupt races, but also top-half races, which includes many new uses over global top-half only data. - Get rid of interlocked_sleep() and use msleep or BUF_LOCK where appropriate. - Use the lk mutex in place of the various hand rolled semaphores. - Stop dropping the lk lock before we panic. - Fix getdirtybuf() callers so that they reacquire access to whatever softdep datastructure they were inxpecting in the failure/retry case. Previously, sleeps in getdirtybuf() could leave us with pointers to bad memory. - Update handling of ffs to be compatible with ffs locking changes. Sponsored By: Isilon Systems, Inc.
Revision 1.165: download - view: text, markup, annotated - select for diffs
Tue Jan 11 07:36:21 2005 UTC (7 years, 1 month ago) by phk
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +7 -7 lines
Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().
I'm not sure why a credential was added to these in the first place, it is
not used anywhere and it doesn't make much sense:
The credentials for syncing a file (ability to write to the
file) should be checked at the system call level.
Credentials for syncing one or more filesystems ("none")
should be checked at the system call level as well.
If the filesystem implementation needs a particular credential
to carry out the syncing it would logically have to the
cached mount credential, or a credential cached along with
any delayed write data.
Discussed with: rwatson
Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Jan 7 02:29:26 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +1 -1 lines
/* -> /*- for license, minor formatting changes
Revision 1.163: download - view: text, markup, annotated - select for diffs
Fri Oct 29 10:15:55 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +6 -24 lines
Move UFS from DEVFS backing to GEOM backing. This eliminates a bunch of vnode overhead (approx 1-2 % speed improvement) and gives us more control over the access to the storage device. Access counts on the underlying device are not correctly tracked and therefore it is possible to read-only mount the same disk device multiple times: syv# mount -p /dev/md0 /var ufs rw 2 2 /dev/ad0 /mnt ufs ro 1 1 /dev/ad0 /mnt2 ufs ro 1 1 /dev/ad0 /mnt3 ufs ro 1 1 Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches things in RAM) this is not possible with read-write mounts, and the system will correctly reject this. Details: Add a geom consumer and a bufobj pointer to ufsmount. Eliminate the vnode argument from softdep_disk_prewrite(). Pick the vnode out of bp->b_vp for now. Eventually we should find it through bp->b_bufobj->b_private. In the mountcode, use g_vfs_open() once we have used VOP_ACCESS() to check permissions. When upgrading and downgrading between r/o and r/w do the right thing with GEOM access counts. Remove all the workarounds for not being able to do this with VOP_OPEN(). If we are the root mount, drop the exclusive access count until we upgrade to r/w. This allows fsck of the root filesystem and the MNT_RELOAD to work correctly. Set bo_private to the GEOM consumer on the device bufobj. Change the ffs_ops->strategy function to call g_vfs_strategy() In ufs_strategy() directly call the strategy on the disk bufobj. Same in rawread. In ffs_fsync() we will no longer see VCHR device nodes, so remove code which synced the filesystem mounted on it, in case we came there. I'm not sure this code made sense in the first place since we would have taken the specfs route on such a vnode. Redo the highly bogus readblock() function in the snapshot code to something slightly less bogus: Constructing an uio and using physio was really quite a detour. Instead just fill in a bio and ship it down.
Revision 1.162: download - view: text, markup, annotated - select for diffs
Tue Oct 26 20:13:49 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -2 lines
KASSERT that we only get to prewrite() on writes.
Revision 1.161: download - view: text, markup, annotated - select for diffs
Tue Oct 26 10:44:10 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +1 -3 lines
The island council met and voted buf_prewrite() home. Give ffs it's own bufobj->bo_ops vector and create a private strategy routine, (currently misnamed for forwards compatibility), which is just a copy of the generic bufstrategy routine except we call softdep_disk_prewrite() directly instead of through the buf_prewrite() indirection. Teach UFS about the need for softdep_disk_prewrite() and call the function directly in FFS. Remove buf_prewrite() from the default bufstrategy() and from the global bio_ops method vector.
Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue Oct 26 06:25:56 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +2 -2 lines
Degeneralize the per cdev copyonwrite callback. The only possible value is ffs_copyonwrite() and the only place it can be called from is FFS which would never want to call another filesystems copyonwrite method, should one exist, so there is no reason why anything generic should know about this.
Revision 1.159: download - view: text, markup, annotated - select for diffs
Mon Oct 25 09:14:03 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +5 -6 lines
Loose the v_dirty* and v_clean* alias macros. Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST().
Revision 1.158: download - view: text, markup, annotated - select for diffs
Fri Oct 22 08:47:20 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +1 -1 lines
Add b_bufobj to struct buf which eventually will eliminate the need for b_vp. Initialize b_bufobj for all buffers. Make incore() and gbincore() take a bufobj instead of a vnode. Make inmem() local to vfs_bio.c Change a lot of VI_[UN]LOCK(bp->b_vp) to BO_[UN]LOCK(bp->b_bufobj) also VI_MTX() to BO_MTX(), Make buf_vlist_add() take a bufobj instead of a vnode. Eliminate other uses of bp->b_vp where bp->b_bufobj will do. Various minor polishing: remove "register", turn panic into KASSERT, use new function declarations, TAILQ_FOREACH_SAFE() etc.
Revision 1.157: download - view: text, markup, annotated - select for diffs
Thu Oct 21 15:53:53 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +7 -6 lines
Move the VI_BWAIT flag into no bo_flag element of bufobj and call it BO_WWAIT Add bufobj_wref(), bufobj_wdrop() and bufobj_wwait() to handle the write count on a bufobj. Bufobj_wdrop() replaces vwakeup(). Use these functions all relevant places except in ffs_softdep.c where the use if interlocked_sleep() makes this impossible. Rename b_vnbufs to b_bobufs now that we touch all the relevant files anyway.
Revision 1.156: download - view: text, markup, annotated - select for diffs
Sun Aug 8 13:21:54 2004 UTC (7 years, 6 months ago) by phk
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +3 -3 lines
use bufdone() not biodone().
Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Jul 28 06:41:27 2004 UTC (7 years, 6 months ago) by kan
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +8 -7 lines
Avoid using casts as lvalues. Introduce DIP_SET macro which sets proper inode field based on UFS version. Use DIP ro read values and DIP_SET to modify them throughout FFS code base.
Revision 1.154: download - view: text, markup, annotated - select for diffs
Sat Jul 10 20:45:47 2004 UTC (7 years, 7 months ago) by marcel
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +2 -1 lines
Update for the KDB debugger framework: o Make debugging code conditional upon KDB. o Use kdb_backtrace() instead of backtrace(). o Remove inclusion of opt_ddb.h.
Revision 1.57.2.13: download - view: text, markup, annotated - select for diffs
Sun Jun 27 05:32:39 2004 UTC (7 years, 7 months ago) by jmg
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11
Diff to: previous 1.57.2.12: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.12: +1 -1 lines
fix a deadlock that can occure w/ large files and syncing disks... PR: 66781 Submitted by: brian at ncircle dot com Reviewed by: mckusick
Revision 1.153: download - view: text, markup, annotated - select for diffs
Tue Apr 6 19:20:24 2004 UTC (7 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +1 -1 lines
Fix a paste-o from the buf_prewrite() cleanup commit and check for the MNTK_SUSPEND flag on the correct vnode pointer in softdep_disk_prewrite(). Reviewed by: phk Tested by: kensmith
Revision 1.57.2.12: download - view: text, markup, annotated - select for diffs
Mon Mar 15 18:04:41 2004 UTC (7 years, 10 months ago) by fjoe
Branches: RELENG_4
CVS tags: RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.57.2.11: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.11: +4 -4 lines
softdep_sync_metadata: fix bug introduced in rev. 1.57.2.10: call drain_output() in correct place (before checking dirty list and with locks held). Approved by: mckusick Spotted by: <rjshang@synology.com>
Revision 1.152: download - view: text, markup, annotated - select for diffs
Thu Mar 11 18:50:33 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +30 -0 lines
When I was a kid my work table was one cluttered mess an cleaning it up were a rather overwhelming task. I soon learned that if you don't know where you're going to store something, at least try to pile it next to something slightly related in the hope that a pattern emerges. Apply the same principle to the ffs/snapshot/softupdates code which have leaked into specfs: Add yet a buf-quasi-method and call it from the only two places I can see it can make a difference and implement the magic in ffs_softdep.c where it belongs. It's not pretty, but at least it's one less layer violated.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Thu Mar 11 18:02:36 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +10 -10 lines
Properly vector all bwrite() and BUF_WRITE() calls through the same path and s/BUF_WRITE()/bwrite()/ since it now does the same as bwrite().
Revision 1.150: download - view: text, markup, annotated - select for diffs
Mon Feb 23 06:56:31 2004 UTC (7 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +1 -1 lines
In the function clear_inodedeps(), a FREE_LOCK() should be called AFTER the call to vn_start_write(), not before it. Otherwise, it is possible to unlock it multiple times if the vn_start_write() fails. Submitted by: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Revision 1.149: download - view: text, markup, annotated - select for diffs
Thu Oct 23 21:14:08 2003 UTC (8 years, 3 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +2 -2 lines
Move the P_COWINPROGRESS flag from being a per-process p_flag to being a per-thread td_pflag which doesn't require any locks to read or write as it is only read or written by curthread on itself. Glanced at by: mckusick
Revision 1.148: download - view: text, markup, annotated - select for diffs
Mon Oct 6 03:28:03 2003 UTC (8 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +6 -0 lines
- My last commit to this file is still not safe, I believe that it may be due to the recursion in indir_trunc().
Revision 1.147: download - view: text, markup, annotated - select for diffs
Mon Oct 6 02:39:37 2003 UTC (8 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +5 -3 lines
- Reinstate 1.142 this was fixed by 1.144.
Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Oct 4 15:57:05 2003 UTC (8 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +4 -1 lines
- The VI assert in getdirtybuf() is only valid if we're not on a VCHR vnode. VCHR vnodes don't do background writes. Reported by: kan
Revision 1.145: download - view: text, markup, annotated - select for diffs
Sat Oct 4 11:06:43 2003 UTC (8 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +1 -6 lines
- Remove a mp_fixme() and some locks that weren't necessary. I now understand how this works.
Revision 1.144: download - view: text, markup, annotated - select for diffs
Wed Sep 3 04:08:15 2003 UTC (8 years, 5 months ago) by jeff
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +16 -9 lines
- Several of the callers to getdirtybuf() were erroneously changed to pass in a list head instead of a pointer to the first element at the time of the first call. These lists are subject to change, and getdirtybuf() would refetch from the wrong list in some cases. Spottedy by: tegge Pointy hat to: me
Revision 1.143: download - view: text, markup, annotated - select for diffs
Sun Aug 31 11:26:52 2003 UTC (8 years, 5 months ago) by jeff
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -5 lines
- Backout rev 1.142. This caused a deadlock that I do not understand. More investigation is required.
Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Aug 31 08:50:11 2003 UTC (8 years, 5 months ago) by jeff
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +5 -3 lines
- Define a new flag for getblk(): GB_NOCREAT. This flag causes getblk() to bail out if the buffer is not already present. - The buffer returned by incore() is not locked and should not be sent to brelse(). Use getblk() with the new GB_NOCREAT flag to preserve the desired semantics.
Revision 1.141: download - view: text, markup, annotated - select for diffs
Sun Aug 31 07:29:34 2003 UTC (8 years, 5 months ago) by jeff
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +77 -53 lines
- Don't acquire the vnode interlock in drain_output(). Instead, require the caller to acquire it. This permits drain_output() to be done atomically with other operations as well as reducing the number of lock operations. - Assert that the proper locks are held in drain_output(). - Change getdirtybuf() to accept a mutex as an argument. This mutex is used to protect the vnode's buf list and the BKGRDWAIT flag. This lock is dropped when we successfully acquire a buffer and held on return otherwise. These semantics reduce the number of cumbersome cases in calling code. - Pass the mtx from getdirtybuf() into interlocked_sleep() and allow this mutex to be used as the interlock argument to BUF_LOCK() in the LOCKBUF case of interlocked_sleep(). - Change the return value of getdirtybuf() to be the resulting locked buffer or NULL otherwise. This is for callers who pass in a list head that requires a lock. It is necessary since the lock that protects the list head must be dropped in getdirtybuf() so that we don't have a lock order reversal with the buf queues lock in bremfree(). - Adjust all callers of getdirtybuf() to match the new semantics. - Add a comment in indir_trunc() that points at unlocked access to a buf. This may also be one of the last instances of incore() in the tree.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Thu Aug 28 06:55:18 2003 UTC (8 years, 5 months ago) by jeff
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +20 -12 lines
- Move BX_BKGRDWAIT and BX_BKGRDINPROG to BV_ and the b_vflags field.
- Surround all accesses of the BKGRD{WAIT,INPROG} flags with the vnode
interlock.
- Don't use the B_LOCKED flag and QUEUE_LOCKED for background write
buffers. Check for the BKGRDINPROG flag before recycling or throwing
away a buffer. We do this instead because it is not safe for us to move
the original buffer to a new queue from the callback on the background
write buffer.
- Remove the B_LOCKED flag and the locked buffer queue. They are no longer
used.
- The vnode interlock is used around checks for BKGRDINPROG where it may
not be strictly necessary. If we hold the buf lock the a back-ground
write will not be started without our knowledge, one may only be
completed while we're not looking. Rather than remove the code, Document
two of the places where this extra locking is done. A pass should be
done to verify and minimize the locking later.
Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue Mar 18 08:45:24 2003 UTC (8 years, 10 months ago) by phk
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +0 -1 lines
Including <sys/stdint.h> is (almost?) universally only to be able to use %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
Revision 1.138: download - view: text, markup, annotated - select for diffs
Tue Mar 4 00:04:43 2003 UTC (8 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +1 -1 lines
- Add a new 'flags' parameter to getblk(). - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter. Reviwed by: arch Not objected to by: mckusick
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun Mar 2 16:54:40 2003 UTC (8 years, 11 months ago) by des
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +1 -1 lines
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
Revision 1.136: download - view: text, markup, annotated - select for diffs
Tue Feb 25 03:37:48 2003 UTC (8 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +5 -4 lines
- Add an interlock argument to BUF_LOCK and BUF_TIMELOCK. - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick
Revision 1.135: download - view: text, markup, annotated - select for diffs
Mon Feb 24 07:28:41 2003 UTC (8 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +15 -2 lines
When removing the last item from a non-empty worklist, the worklist tail pointer must be updated. Reported by: Kris Kennaway <kris@obsecurity.org> Sponsored by: DARPA & NAI Labs.
Revision 1.134: download - view: text, markup, annotated - select for diffs
Wed Feb 19 05:47:45 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +1 -1 lines
Back out M_* changes, per decision of the TRB. Approved by: trb
Revision 1.133: download - view: text, markup, annotated - select for diffs
Tue Jan 21 08:56:15 2003 UTC (9 years ago) by alfred
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +1 -1 lines
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Jan 7 18:23:50 2003 UTC (9 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +12 -5 lines
This patch fixes a problem caused by applications that rapidly and repeatedly truncate the same file. Each time the file is truncated, a buffer is grabbed to store the indirect block numbers that need to be freed. Those blocks cannot be freed until the inode claiming them is written to disk. Thus, the number of buffers being held by soft updates explodes and in extreme cases can run the kernel out of buffers. The problem can be avoided by doing an fsync on the file every debug.maxindirdep truncates (currently defaulted to 50). The fsync causes the inode to be written so that the held buffers can be freed. The check for excessive buffers is checked as part of the existing hook for excessive dependencies (softdep_slowdown) in the truncate code. Reported by: David Schultz <dschultz@uclink.Berkeley.EDU> Sponsored by: DARPA & NAI Labs. MFC after: 3 weeks
Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Jan 1 18:48:59 2003 UTC (9 years, 1 month ago) by schweikh
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +1 -1 lines
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, especially in troff files.
Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Sun Dec 29 14:54:19 2002 UTC (9 years, 1 month ago) by phk
Branches: RELENG_5_0
CVS tags: RELENG_5_0_0_RELEASE
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +0 -3 lines
MFC: Use UMA for allocationg FFS inodes and dinodes. Approved by: rwatson
Revision 1.130: download - view: text, markup, annotated - select for diffs
Tue Dec 17 20:23:51 2002 UTC (9 years, 1 month ago) by phk
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +0 -3 lines
Remove unused lockcnt variable. Approved by: mckusick
Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Nov 20 05:16:11 2002 UTC (9 years, 2 months ago) by mckusick
Branches: MAIN
CVS tags: RELENG_5_0_BP
Branch point for: RELENG_5_0
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +1 -1 lines
The target for the maximum number of dependencies has been cut in half because of reports that under heavy load the kernel could exhaust its memory pool. The limit is now (desiredvnodes * 4) rather than (desiredvnodes * 8), so it will still scale with larger systems, just not as quickly. Sponsored by: DARPA & NAI Labs.
Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Nov 20 05:14:16 2002 UTC (9 years, 2 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +6 -0 lines
If an error occurs while writing a buffer, then the data will not have hit the disk and the dependencies cannot be unrolled. In this case, the system will mark the buffer as dirty again so that the write can be retried in the future. When the write succeeds or the system gives up on the buffer and marks it as invalid (B_INVAL), the dependencies will be cleared. Sponsored by: DARPA & NAI Labs.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Oct 23 21:47:02 2002 UTC (9 years, 3 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +14 -1 lines
We must be careful to avoid recursive copy-on-write faults when trying to clean up during disk-full senarios. Sponsored by: DARPA & NAI Labs.
Revision 1.126: download - view: text, markup, annotated - select for diffs
Wed Oct 23 05:14:06 2002 UTC (9 years, 3 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +1 -1 lines
Missplaced FREE_LOCK causes a panic when hit while taking a snapshot. Sponsored by: DARPA & NAI Labs.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Sat Sep 28 19:04:49 2002 UTC (9 years, 4 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +1 -1 lines
When spamming me with a printf(9), under DIAGNOSTIC, at least be nice enough to include a newline. MFC after: 4 days Sponsored by: Bright Path Solutions
Revision 1.124: download - view: text, markup, annotated - select for diffs
Sat Sep 28 17:15:30 2002 UTC (9 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -2 lines
Be consistent about "static" functions: if the function is marked static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Sep 25 02:49:48 2002 UTC (9 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +12 -1 lines
- Convert locks to use standard macros. - Lock access to the buflists. - Document broken locking. - Use vrefcnt().
Revision 1.122: download - view: text, markup, annotated - select for diffs
Sun Aug 4 10:29:35 2002 UTC (9 years, 6 months ago) by jeff
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +21 -12 lines
- Replace v_flag with v_iflag and v_vflag - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
Revision 1.121: download - view: text, markup, annotated - select for diffs
Sat Jul 20 01:09:35 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -1 lines
Fix a warning: ffs_softdep.c:1630: warning: int format, different type arg (arg 2)
Revision 1.120: download - view: text, markup, annotated - select for diffs
Fri Jul 19 07:29:38 2002 UTC (9 years, 6 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +403 -118 lines
Add support to UFS2 to provide storage for extended attributes.
As this code is not actually used by any of the existing
interfaces, it seems unlikely to break anything (famous
last words).
The internal kernel interface to manipulate these attributes
is invoked using two new IO_ flags: IO_NORMAL and IO_EXT.
These flags may be specified in the ioflags word of VOP_READ,
VOP_WRITE, and VOP_TRUNCATE. Specifying IO_NORMAL means that
you want to do I/O to the normal data part of the file and
IO_EXT means that you want to do I/O to the extended attributes
part of the file. IO_NORMAL and IO_EXT are mutually exclusive
for VOP_READ and VOP_WRITE, but may be specified individually
or together in the case of VOP_TRUNCATE. For example, when
removing a file, VOP_TRUNCATE is called with both IO_NORMAL
and IO_EXT set. For backward compatibility, if neither IO_NORMAL
nor IO_EXT is set, then IO_NORMAL is assumed.
Note that the BA_ and IO_ flags have been `merged' so that they
may both be used in the same flags word. This merger is possible
by assigning the IO_ flags to the low sixteen bits and the BA_
flags the high sixteen bits. This works because the high sixteen
bits of the IO_ word is reserved for read-ahead and help with
write clustering so will never be used for flags. This merge
lets us get away from code of the form:
if (ioflags & IO_SYNC)
flags |= BA_SYNC;
For the future, I have considered adding a new field to the
vattr structure, va_extsize. This addition could then be
exported through the stat structure to allow applications to
find out the size of the extended attribute storage and also
would provide a more standard interface for truncating them
(via VOP_SETATTR rather than VOP_TRUNCATE).
I am also contemplating adding a pathconf parameter (for
concreteness, lets call it _PC_MAX_EXTSIZE) which would
let an application determine the maximum size of the extended
atribute storage.
Sponsored by: DARPA & NAI Labs.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Mon Jul 1 17:59:40 2002 UTC (9 years, 7 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +6 -0 lines
Use indirect function pointer hooks instead of #ifdef SOFTUPDATES direct calls for the two places where the kernel calls into soft updates code. Set up the hooks in softdep_initialize() and NULL them out in softdep_uninitialize(). This change allows soft updates to function correctly when ufs is loaded as a module. Reviewed by: mckusick
Revision 1.118: download - view: text, markup, annotated - select for diffs
Mon Jul 1 11:00:47 2002 UTC (9 years, 7 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +13 -0 lines
Add the ffs bits necessary to support unloading of the ufs kernel module. This adds an ffs_uninit() function that calls ufs_uninit() and also calls a new softdep_uninitialize() function. Add a stub for softdep_uninitialize() to cover the non-SOFTUPDATES case. Reviewed by: mckusick
Revision 1.117: download - view: text, markup, annotated - select for diffs
Sun Jun 23 18:17:26 2002 UTC (9 years, 7 months ago) by mux
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +9 -9 lines
Warning fixes for 64 bits platforms. This eliminates all the warnings I have had in the FFS code on sparc64. Reviewed by: mckusick
Revision 1.116: download - view: text, markup, annotated - select for diffs
Fri Jun 21 06:18:03 2002 UTC (9 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +351 -104 lines
This commit adds basic support for the UFS2 filesystem. The UFS2 filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
Revision 1.115: download - view: text, markup, annotated - select for diffs
Fri May 17 18:59:50 2002 UTC (9 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +1 -1 lines
Fix ufs_daddr_t/daddr_t type problems. Sponsored by: DARPA & NAI labs.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu May 16 21:28:29 2002 UTC (9 years, 8 months ago) by trhodes
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +6 -6 lines
More s/file system/filesystem/g
Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Apr 15 03:35:35 2002 UTC (9 years, 9 months ago) by jeff
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +1 -2 lines
Don't peak into the malloc_type structure for limits. The desired vnodes check should be sufficient. This is required for the pending removal of malloc_type limits.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Mar 19 22:40:46 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +63 -66 lines
Remove __P.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Mar 17 01:25:46 2002 UTC (9 years, 10 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +41 -26 lines
Add a flags parameter to VFS_VGET to pass through the desired locking flags when acquiring a vnode. The immediate purpose is to allow polling lock requests (LK_NOWAIT) needed by soft updates to avoid deadlock when enlisting other processes to help with the background cleanup. For the future it will allow the use of shared locks for read access to vnodes. This change touches a lot of files as it affects most filesystems within the system. It has been well tested on FFS, loopback, and CD-ROM filesystems. only lightly on the others, so if you find a problem there, please let me (mckusick@mckusick.com) know.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Mar 15 18:49:46 2002 UTC (9 years, 10 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +5 -2 lines
Introduce the new 64-bit size disk block, daddr64_t. Change the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri Mar 15 04:06:10 2002 UTC (9 years, 11 months ago) by obrien
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +5 -1 lines
Quiet a warning on the Alpha.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Feb 27 18:32:22 2002 UTC (9 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +9 -9 lines
Simple p_ucred -> td_ucred changes to start using the per-thread ucred reference.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Thu Feb 7 00:54:32 2002 UTC (10 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +10 -7 lines
Occationally deleted files would hang around for hours or days without being reclaimed. This bug was introduced in revision 1.95 dealing with filenames placed in newly allocated directory blocks, thus is not present in 4.X systems. The bug is triggered when a new entry is made in a directory after the data block containing the original new entry has been written, but before the inode that references the data block has been written. Submitted by: Bill Fenner <fenner@research.att.com>
Revision 1.57.2.11: download - view: text, markup, annotated - select for diffs
Tue Feb 5 18:46:53 2002 UTC (10 years ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6
Diff to: previous 1.57.2.10: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.10: +76 -38 lines
MFC 1.104 - fix bug where spl saved in softupdates lock could get stomped by another process. Approved by: mckusick
Revision 1.57.2.10: download - view: text, markup, annotated - select for diffs
Tue Feb 5 07:49:00 2002 UTC (10 years ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.9: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.9: +11 -9 lines
MFC 1.103. drain_output() must be called prior to checking for dirty buffers or we may get an incorrect indication, resulting in a later panic.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Feb 2 01:42:44 2002 UTC (10 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +34 -37 lines
When taking a snapshot, we must check for active files that have been unlinked (e.g., with a zero link count). We have to expunge all trace of these files from the snapshot so that they are neither reclaimed prematurely by fsck nor saved unnecessarily by dump.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Jan 22 06:17:22 2002 UTC (10 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +41 -4 lines
This patch fixes a long standing complaint with soft updates in which small and/or nearly full filesystems would fail with `file system full' messages when trying to replace a number of existing files (for example during a system installation). When the allocation routines are about to fail with a file system full condition, they make a call to softdep_request_cleanup() which attempts to accelerate the flushing of pending deletion requests in an effort to free up space. In the face of filesystem I/O requests that exceed the available disk transfer capacity, the cleanup request could take an unbounded amount of time. Thus, the softdep_request_cleanup() routine will only try for tickdelay seconds (default 2 seconds) before giving up and returning a filesystem full error. Under typical conditions, the softdep_request_cleanup() routine is able to free up space in under fifty milliseconds.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Sat Jan 12 20:57:36 2002 UTC (10 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +76 -38 lines
When going to sleep, we must save our SPL so that it does not get lost if some other process uses the lock while we are sleeping. We restore it after we have slept. This functionality is provided by a new routine interlocked_sleep() that wraps the interlocking with functions that sleep. This function is then used in place of the old ACQUIRE_LOCK_INTERLOCKED() and FREE_LOCK_INTERLOCKED() macros. Submitted by: Debbie Chu <dchu@juniper.net>
Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Jan 11 19:59:27 2002 UTC (10 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +10 -8 lines
Must call drain_output() before checking the dirty block list in softdep_sync_metadata(). Otherwise we may miss dependencies that need to be flushed which will result in a later panic with the message ``vinvalbuf: dirty bufs''. Submitted by: Matthew Dillon <dillon@apollo.backplane.com> MFC after: 1 week
Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Jan 8 19:32:18 2002 UTC (10 years, 1 month ago) by msmith
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +8 -9 lines
Initialise the bioops vector hack at runtime rather than at link time. This avoids the use of common variables. Reviewed by: mckusick
Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Sep 27 21:04:13 2001 UTC (10 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +5 -5 lines
- Fix some minor whitespace nits. - Move the SPECIAL_FLAG #define up next to the NOHOLDER #define and fix a little nit that caused it to be defined as -(sizeof (struct thread) + 1) instead of -2.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:38:07 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +99 -97 lines
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Jun 13 23:13:13 2001 UTC (10 years, 8 months ago) by mckusick
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +22 -14 lines
Build on the change in revision 1.98 by Tor.Egge@fast.no. The symptom being treated in 1.98 was to avoid freeing a pagedep dependency if there was still a newdirblk dependency referencing it. That change is correct and no longer prints a warning message when it occurs. The other part of revision 1.98 was to panic when a newdirblk dependency was encountered during a file truncation. This fix removes that panic and replaces it with code to find and delete the newdirblk dependency so that the truncation can succeed.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Jun 5 01:49:37 2001 UTC (10 years, 8 months ago) by obrien
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +12 -3 lines
There seems to be a problem that the order of disk write operation being incorrect due to a missing check for some dependency. This change avoids the freelist corruption (but not the temporarily inconsistent state of the file system). A message is printed as a reminder of the under lying problem when a pagedep structure is not freed due to the NEWBLOCK flag being set. Submitted by: Tor.Egge@fast.no
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat May 19 19:24:26 2001 UTC (10 years, 8 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +12 -4 lines
Must ensure that all the entries on the pd_pendinghd list have been committed to disk before clearing them. More specifically, when free_newdirblk is called, we know that the inode claims the new directory block. However, if the associated pagedep is still linked onto the directory buffer dependency chain, then some of the entries on the pd_pendinghd list may not be committed to disk yet. In this case, we will simply note that the inode claims the block and let the pd_pendinghd list be processed when the pagedep is next written. If the pagedep is no longer on the buffer dependency chain, then all the entries on the pd_pending list are committed to disk and we can free them in free_newdirblk. This corrects a window of vulnerability introduced in the code added in version 1.95.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Fri May 18 22:16:28 2001 UTC (10 years, 8 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -2 lines
Must be a bit less aggressive about freeing pagedep structures. Obtained from: Robert Watson <rwatson@FreeBSD.org> and Matthew Jacob <mjacob@feral.com>
Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu May 17 07:23:59 2001 UTC (10 years, 8 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +166 -22 lines
When a new block is allocated to a directory, an fsync of a file whose name is within that block must ensure not only that the block containing the file name has been written, but also that the on-disk directory inode references that block. When a new directory block is created, we allocate a newdirblk structure which is linked to the associated allocdirect (on its ad_newdirblk list). When the allocdirect has been satisfied, the newdirblk structure is moved to the inodedep id_bufwait list of its directory to await the inode being written. When the inode is written, the directory entries are fully committed and can be deleted from their pagedep->id_pendinghd and inodedep->id_pendinghd lists.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue May 8 07:42:12 2001 UTC (10 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +59 -2 lines
When running with soft updates, track the number of blocks and files that are committed to being freed and reflect these blocks in the counts returned by statfs (and thus also by the `df' command). This change allows programs such as those that do news expiration to know when to stop if they are trying to create a certain percentage of free space. Note that this change does not solve the much harder problem of making this to-be-freed space available to applications that want it (thus on a nearly full filesystem, you may still encounter out-of-space conditions even though the free space will show up eventually). Hopefully this harder problem will be the subject of a future enhancement.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue May 8 07:13:00 2001 UTC (10 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +30 -28 lines
When syncing out snapshot metadata, we must temporarily allow recursive buffer locking so as to avoid locking against ourselves if we need to write filesystem metadata.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue May 1 09:12:31 2001 UTC (10 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -5 lines
Remove blatantly pointless call to VOP_BMAP(). Use ufs_bmaparray() rather than VOP_BMAP() on our own vnodes.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Apr 29 02:45:12 2001 UTC (10 years, 9 months ago) by grog
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -3 lines
Revert consequences of changes to mount.h, part 2. Requested by: bde
Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Apr 23 08:58:56 2001 UTC (10 years, 9 months ago) by grog
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -1 lines
Correct #includes to work with fixed sys/mount.h.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Wed Mar 21 04:08:55 2001 UTC (10 years, 10 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +25 -12 lines
Add kernel support for running fsck on active filesystems.
Revision 1.57.2.9: download - view: text, markup, annotated - select for diffs
Fri Mar 2 17:22:26 2001 UTC (10 years, 11 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4, RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.57.2.8: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.8: +4 -2 lines
MFC 1.88 - free lock in early return. This can occur if we block getting the lock and another process deals with the worklist before we do. (obvious bug, so quick MFC)
Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Mar 1 21:43:46 2001 UTC (10 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -2 lines
Free lock before returning from process_worklist_item. Obtained from: Constantine Sapuntzakis <csapuntz@stanford.edu>
Revision 1.57.2.8: download - view: text, markup, annotated - select for diffs
Wed Feb 28 03:53:50 2001 UTC (10 years, 11 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.7: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.7: +235 -111 lines
MFC 1.82, 1.83, 1.84 (convert manual loops to LIST/FOREACH macros) MFC 1.85, 1.86, 1.87 - fixes for inodedep races, done check, and making sure we free the lock before panicing. Testing by: ps, peter, dillon Approved by: mckusick
Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Feb 23 09:01:31 2001 UTC (10 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +192 -63 lines
Free lock before calling panic so that subsequent attempt to write out buffers does not re-panic with `locking against myself'. This change should not affect normal operations of soft updates in any way.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Feb 22 10:17:57 2001 UTC (10 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -1 lines
When cleaning up excess inode dependencies, check for being done. Reviewed by: Jan Koum <jkb@yahoo-inc.com>
Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Feb 20 11:14:38 2001 UTC (10 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +10 -5 lines
This patch corrects two problems with the rate limiting code
that was introduced in revision 1.80. The problem manifested
itself with a `locking against myself' panic and could also
result in soft updates inconsistences associated with inodedeps.
The two problems are:
1) One of the background operations could manipulate the bitmap
while holding it locked with intent to create. This held lock
results in a `locking against myself' panic, when the background
processing that we have been coopted to do tries to lock the bitmap
which we are already holding locked. To understand how to fix this
problem, first, observe that we can do the background cleanups in
inodedep_lookup only when allocating inodedeps (DEPALLOC is set in
the call to inodedep_lookup). Second observe that calls to
inodedep_lookup with DEPALLOC set can only happen from the following
calls into the softdep code:
softdep_setup_inomapdep
softdep_setup_allocdirect
softdep_setup_remove
softdep_setup_freeblocks
softdep_setup_directory_change
softdep_setup_directory_add
softdep_change_linkcnt
Only the first two of these can come from ffs_alloc.c while holding
a bitmap locked. Thus, inodedep_lookup must not go off to do
request_cleanups when being called from these functions. This change
adds a flag, NODELAY, that can be passed to inodedep_lookup to let
it know that it should not do background processing in those cases.
2) The return value from request_cleanup when helping out with the
cleanup was 0 instead of 1. This meant that despite the fact that
we may have slept while doing the cleanups, the code did not recheck
for the appearance of an inodedep (e.g., goto top in inodedep_lookup).
This lead to the softdep inconsistency in which we ended up with
two inodedep's for the same inode.
Reviewed by: Peter Wemm <peter@yahoo-inc.com>,
Matt Dillon <dillon@earth.backplane.com>
Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Feb 4 16:08:18 2001 UTC (11 years ago) by phk
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +14 -27 lines
Another round of the <sys/queue.h> FOREACH transmogriffer. Created with: sed(1) Reviewed by: md5(1)
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Feb 4 13:13:20 2001 UTC (11 years ago) by phk
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3 lines
Mechanical change to use <sys/queue.h> macro API instead of fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Feb 4 12:37:48 2001 UTC (11 years ago) by phk
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +17 -17 lines
Use <sys/queue.h> macro API.
Revision 1.57.2.7: download - view: text, markup, annotated - select for diffs
Fri Feb 2 21:22:44 2001 UTC (11 years ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.6: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.6: +43 -13 lines
MFC 1.81, fix race between syncer and umount.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jan 30 06:31:59 2001 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +39 -13 lines
Fix a race between the syncer and umount. When you umount a softupdates filesystem softdep_process_worklist() is called in a loop until it indicates that no dependancies remain, but the determination of that fact depends on there only being one softdep_process_worklist() instance running. It was possible for the syncer to also be running softdep_process_worklist() and the pre-existing checks in the code to prevent this were not sufficient to prevent the race. This patch solves the problem. Approved-by: mckusick
Revision 1.57.2.6: download - view: text, markup, annotated - select for diffs
Thu Dec 28 11:01:45 2000 UTC (11 years, 1 month ago) by ps
Branches: RELENG_4
Diff to: previous 1.57.2.5: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.5: +161 -88 lines
MFC: Prevent runaway of kernel soft updates memory. Approved by: mckusick
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Dec 13 08:30:30 2000 UTC (11 years, 2 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +160 -71 lines
Preventing runaway kernel soft updates memory, take three. Previously, the syncer process was the only process in the system that could process the soft updates background work list. If enough other processes were adding requests to that list, it would eventually grow without bound. Because some of the work list requests require vnodes to be locked, it was not generally safe to let random processes process the work list while they already held vnodes locked. By adding a flag to the work list queue processing function to indicate whether the calling process could safely lock vnodes, it becomes possible to co-opt other processes into helping out with the work list. Now when the worklist gets too large, other processes can safely help out by picking off those work requests that can be handled without locking a vnode, leaving only the small number of requests requiring a vnode lock for the syncer process. With this change, it appears possible to keep even the nastiest workloads under control. Submitted by: Paul Saab <ps@yahoo-inc.com>
Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Dec 8 21:51:03 2000 UTC (11 years, 2 months ago) by dwmalone
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +9 -15 lines
Convert more malloc+bzero to malloc+M_ZERO. Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Dec 8 20:09:00 2000 UTC (11 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +14 -14 lines
Staticize some malloc M_ instances.
Revision 1.57.2.5: download - view: text, markup, annotated - select for diffs
Sun Nov 26 02:55:13 2000 UTC (11 years, 2 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.4: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.4: +20 -18 lines
MFC the major low memory deadlock solution. This patch removes most of the preexisting low-memory-handling hacks and replaces it with a relatively simple concept: The entire I/O path (except networking) is allowed to dig into the system memory reserve but will effectively free resources rather then leave them wired/cached if the system is found to be in a low-memory situation, thus allowing I/O to continue to operate. This patch also fixes a VXLOCK self-deadlock and generates a message if it detects what used to be the deadlock. (this also MFCd) Finally, this patch removes code related to the case where the original page could not be found during bogus page recovery and replaces it with a panic. The original page had better still exist since we have an extra reference on it and on the VM object during the I/O. (this also MFCd)
Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon Nov 20 06:22:39 2000 UTC (11 years, 2 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +22 -34 lines
More aggressively rate limit the growth of soft dependency structures in the face of multiple processes doing massive numbers of filesystem operations. While this patch will work in nearly all situations, there are still some perverse workloads that can overwhelm the system. Detecting and handling these perverse workloads will be the subject of another patch. Reviewed by: Paul Saab <ps@yahoo-inc.com> Obtained from: Ethan Solomita <ethan@geocast.com>
Revision 1.57.2.4: download - view: text, markup, annotated - select for diffs
Sun Nov 19 22:32:35 2000 UTC (11 years, 2 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_2_0_RELEASE
Diff to: previous 1.57.2.3: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.3: +20 -16 lines
MFC 1.75, fixup write-ordering for bitmap blocks. Approved: jkh
Revision 1.76: download - view: text, markup, annotated - select for diffs
Sat Nov 18 23:06:24 2000 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +20 -18 lines
Implement a low-memory deadlock solution.
Removed most of the hacks that were trying to deal with low-memory
situations prior to now.
The new code is based on the concept that I/O must be able to function in
a low memory situation. All major modules related to I/O (except
networking) have been adjusted to allow allocation out of the system
reserve memory pool. These modules now detect a low memory situation but
rather then block they instead continue to operate, then return resources
to the memory pool instead of cache them or leave them wired.
Code has been added to stall in a low-memory situation prior to a vnode
being locked.
Thus situations where a process blocks in a low-memory condition while
holding a locked vnode have been reduced to near nothing. Not only will
I/O continue to operate, but many prior deadlock conditions simply no
longer exist.
Implement a number of VFS/BIO fixes
(found by Ian): in biodone(), bogus-page replacement code, the loop
was not properly incrementing loop variables prior to a continue
statement. We do not believe this code can be hit anyway but we
aren't taking any chances. We'll turn the whole section into a
panic (as it already is in brelse()) after the release is rolled.
In biodone(), the foff calculation was incorrectly
clamped to the iosize, causing the wrong foff to be calculated
for pages in the case of an I/O error or biodone() called without
initiating I/O. The problem always caused a panic before. Now it
doesn't. The problem is mainly an issue with NFS.
Fixed casts for ~PAGE_MASK. This code worked properly before only
because the calculations use signed arithmatic. Better to properly
extend PAGE_MASK first before inverting it for the 64 bit masking
op.
In brelse(), the bogus_page fixup code was improperly throwing
away the original contents of 'm' when it did the j-loop to
fix the bogus pages. The result was that it would potentially
invalidate parts of the *WRONG* page(!), leading to corruption.
There may still be cases where a background bitmap write is
being duplicated, causing potential corruption. We have identified
a potentially serious bug related to this but the fix is still TBD.
So instead this patch contains a KASSERT to detect the problem
and panic the machine rather then continue to corrupt the filesystem.
The problem does not occur very often.. it is very hard to
reproduce, and it may or may not be the cause of the corruption
people have reported.
Review by: (VFS/BIO: mckusick, Ian Dowse <iedowse@maths.tcd.ie>)
Testing by: (VM/Deadlock) Paul Saab <ps@yahoo-inc.com>
Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Nov 14 09:00:25 2000 UTC (11 years, 2 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +19 -16 lines
When deleting a file, the ordering of events imposed by soft updates is to first write the deleted directory entry to disk, second write the zero'ed inode to disk, and finally to release the freed blocks and the inode back to the cylinder-group map. As this ordering requires two disk writes to occur which are normally spaced about 30 seconds apart (except when memory is under duress), it takes about a minute from the time that a file is deleted until its inode and data blocks show up in the cylinder-group map for reallocation. If a file has had only a brief lifetime (less than 30 seconds from creation to deletion), neither its inode nor its directory entry may have been written to disk. If its directory entry has not been written to disk, then we need not wait for that directory block to be written as the on-disk directory block does not reference the inode. Similarly, if the allocated inode has never been written to disk, we do not have to wait for it to be written back either as its on-disk representation is still zero'ed out. Thus, in the case of a short lived file, we can simply release the blocks and inode to the cylinder-group map immediately. As the inode and its blocks are released immediately, they are immediately available for other uses. If they are not released for a minute, then other inodes and blocks must be allocated for short lived files, cluttering up the vnode and buffer caches. The previous code was a bit too aggressive in trying to release the blocks and inode back to the cylinder-group map resulting in their being made available when in fact the inode on disk had not yet been zero'ed. This patch takes a more conservative approach to doing the release which avoids doing the release prematurely.
Revision 1.57.2.3: download - view: text, markup, annotated - select for diffs
Sat Nov 11 20:14:03 2000 UTC (11 years, 3 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.2: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.2: +3 -2 lines
MFC 1.68 - fix softupdates crash when quota exceeded Approved by: jkh
Revision 1.57.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 7 16:15:40 2000 UTC (11 years, 3 months ago) by dillon
Branches: RELENG_4
Diff to: previous 1.57.2.1: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.1: +3 -3 lines
MFC 1.73. Cannot do MALLOC while holding ACQUIRE_LOCK.
Approved by: jkh
Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon Oct 9 17:31:39 2000 UTC (11 years, 4 months ago) by eivind
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +5 -5 lines
Blow away the v_specmountpoint define, replacing it with what it was defined as (rdev->si_mountpoint)
Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Sep 7 23:02:55 2000 UTC (11 years, 5 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
Cannot do MALLOC with M_WAITOK while holding ACQUIRE_LOCK Obtained from: Ethan Solomita <ethan@geocast.com>
Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Sep 7 01:33:01 2000 UTC (11 years, 5 months ago) by jasone
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -2 lines
Major update to the way synchronization is done in the kernel. Highlights include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Jul 24 05:28:31 2000 UTC (11 years, 6 months ago) by mckusick
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +56 -37 lines
This patch corrects the first round of panics and hangs reported with the new snapshot code. Update addaliasu to correctly implement the semantics of the old checkalias function. When a device vnode first comes into existence, check to see if an anonymous vnode for the same device was created at boot time by bdevvp(). If so, adopt the bdevvp vnode rather than creating a new vnode for the device. This corrects a problem which caused the kernel to panic when taking a snapshot of the root filesystem. Change the calling convention of vn_write_suspend_wait() to be the same as vn_start_write(). Split out softdep_flushworklist() from softdep_flushfiles() so that it can be used to clear the work queue when suspending filesystem operations. Access to buffers becomes recursive so that snapshots can recursively traverse their indirect blocks using ffs_copyonwrite() when checking for the need for copy on write when flushing one of their own indirect blocks. This eliminates a deadlock between the syncer daemon and a process taking a snapshot. Ensure that softdep_process_worklist() can never block because of a snapshot being taken. This eliminates a problem with buffer starvation. Cleanup change in ffs_sync() which did not synchronously wait when MNT_WAIT was specified. The result was an unclean filesystem panic when doing forcible unmount with heavy filesystem I/O in progress. Return a zero'ed block when reading a block that was not in use at the time that a snapshot was taken. Normally, these blocks should never be read. However, the readahead code will occationally read them which can cause unexpected behavior. Clean up the debugging code that ensures that no blocks be written on a filesystem while it is suspended. Snapshots must explicitly label the blocks that they are writing during the suspension so that they do not cause a `write on suspended filesystem' panic. Reorganize ffs_copyonwrite() to eliminate a deadlock and also to prevent a race condition that would permit the same block to be copied twice. This change eliminates an unexpected soft updates inconsistency in fsck caused by the double allocation. Use bqrelse rather than brelse for buffers that will be needed soon again by the snapshot code. This improves snapshot performance.
Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Jul 11 22:07:54 2000 UTC (11 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +38 -17 lines
Add snapshots to the fast filesystem. Most of the changes support the gating of system calls that cause modifications to the underlying filesystem. The gating can be enabled by any filesystem that needs to consistently suspend operations by adding the vop_stdgetwritemount to their set of vnops. Once gating is enabled, the function vfs_write_suspend stops all new write operations to a filesystem, allows any filesystem modifying system calls already in progress to complete, then sync's the filesystem to disk and returns. The function vfs_write_resume allows the suspended write operations to begin again. Gating is not added by default for all filesystems as for SMP systems it adds two extra locks to such critical kernel paths as the write system call. Thus, gating should only be added as needed. Details on the use and current status of snapshots in FFS can be found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness is not included here. Unless and until you create a snapshot file, these changes should have no effect on your system (famous last words).
Revision 1.34.2.4: download - view: text, markup, annotated - select for diffs
Thu Jun 22 19:32:07 2000 UTC (11 years, 7 months ago) by peter
Branches: RELENG_3
Diff to: previous 1.34.2.3: preferred, colored
Changes since revision 1.34.2.3: +7 -24 lines
MFC: new bsd-style unrestricted license text.
Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 19:27:42 2000 UTC (11 years, 7 months ago) by peter
Branches: RELENG_4
CVS tags: RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +7 -24 lines
MFC: new bsd-style unrestricted license text
Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Jun 22 00:29:53 2000 UTC (11 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +8 -25 lines
Update to new copyright.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Jun 18 22:14:28 2000 UTC (11 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -3 lines
When running with quotas enabled on a filesystem using soft updates, the system would panic when a user's inode quota was exceeded (see PR 18959 for details). This fixes that problem. PR: 18959 Submitted by: Jason Godsey <jason@unixguy.fidalgo.net>
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Jun 18 22:05:57 2000 UTC (11 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +19 -9 lines
Some additional performance improvements. When freeing an inode check to see if it has been committed to disk. If it has never been written, it can be freed immediately. For short lived files this change allows the same inode to be reused repeatedly. Similarly, when upgrading a fragment to a larger size, if it has never been claimed by an inode on disk, it too can be freed immediately making it available for reuse often in the next slowly growing block of the same file.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Jun 16 13:00:23 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -5 lines
ARGH! I have too many source trees :-( Fix prototype errors in last commit.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Jun 16 08:48:22 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -3 lines
Virtualizes & untangles the bioops operations vector. Ref: Message-ID: <18317.961014572@critter.freebsd.dk> To: current@
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri May 26 02:01:59 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +4 -4 lines
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen. Requested by: msmith and others
Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue May 23 20:34:46 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -4 lines
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri May 5 09:57:27 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -1 lines
Separate the struct bio related stuff out of <sys/buf.h> into <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Apr 15 03:34:12 2000 UTC (11 years, 9 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -1 lines
Introduce extended attribute support for FFS, allowing arbitrary
(name, value) pairs to be associated with inodes. This support is
used for ACLs, MAC labels, and Capabilities in the TrustedBSD
security extensions, which are currently under development.
In this implementation, attributes are backed to data vnodes in the
style of the quota support in FFS. Support for FFS extended
attributes may be enabled using the FFS_EXTATTR kernel option
(disabled by default). Userland utilities and man pages will be
committed in the next batch. VFS interfaces and man pages have
been in the repo since 4.0-RELEASE and are unchanged.
o ufs/ufs/extattr.h: UFS-specific extattr defines
o ufs/ufs/ufs_extattr.c: bulk of support routines
o ufs/{ufs,ffs,mfs}/*.[ch]: hooks and extattr.h includes
o contrib/softupdates/ffs_softdep.c: extattr.h includes
o conf/options, conf/files, i386/conf/LINT: added FFS_EXTATTR
o coda/coda_vfsops.c: XXX required extattr.h due to ufsmount.h
(This should not be the case, and will be fixed in a future commit)
Currently attributes are not supported in MFS. This will be fixed.
Reviewed by: adrian, bp, freebsd-fs, other unthanked souls
Obtained from: TrustedBSD Project
Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Apr 2 15:23:45 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2 lines
Move B_ERROR flag to b_ioflags and call it BIO_ERROR. (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Mar 20 11:28:18 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +12 -13 lines
Rename the existing BUF_STRATEGY() to DEV_STRATEGY() substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Mon Mar 20 10:44:01 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -2 lines
Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Jan 30 20:32:59 2000 UTC (12 years ago) by mckusick
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -2 lines
When writing out bitmap buffers, need to skip over ones that already have a write in progress. Otherwise one can get in an infinite loop trying to get them all flushed. Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Jan 18 01:33:05 2000 UTC (12 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +57 -49 lines
During fastpath processing for removal of a short-lived inode, the set of restrictions for cancelling an inode dependency (inodedep) is somewhat stronger than originally coded. Since this check appears in two places, we codify it into the function check_inode_unwritten which we then call from the two sites, one freeing blocks and the other freeing directory entries. Submitted by: Steinar Haug via Matthew Dillon
Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Jan 18 01:30:03 2000 UTC (12 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +63 -64 lines
Need to reorganize the flushing of directory entry (pagedep) dependencies so that they never try to lock an inode corresponding to ".." as this can lead to deadlock. We observe that any inode with an updated link count is always pushed into its buffer at the time of the link count change, so we do not need to do a VOP_UPDATE, but merely find its buffer and write it. The only time we need to get the inode itself is from the result of a mkdir whose name will never be ".." and hence locking such an inode will never request a lock above us in the filesystem tree. Thanks to Brian Fundakowski Feldman for providing the test program that tickled soft updates into hanging in "inode" sleep. Submitted by: Brian Fundakowski Feldman <green@FreeBSD.org>
Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Jan 17 06:35:11 2000 UTC (12 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +10 -8 lines
Better bounding on softdep_flushfiles; other minor tweeks to checks.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Jan 17 06:28:18 2000 UTC (12 years ago) by mckusick
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +66 -23 lines
Must track multiple uncommitted renames until one ultimately gets committed to disk or is removed.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Jan 14 04:39:28 2000 UTC (12 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
Non-operational change, fix compiler warning.
Reviewed by: mckusick
Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jan 13 20:03:22 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -3 lines
Confirming Peter's fix (locking 101: release the lock before you go to sleep). Locking 101, part 2: do not look at buffer contents after you have been asleep. There is no telling what wonderous changes may have occurred.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Thu Jan 13 18:48:12 2000 UTC (12 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -1 lines
Free the global softupdates lock prior to tsleep() in getdirtybuf(). This seems to be responsible for a bunch of panics where the process sleeps and something else finds softupdates "locked" when it shouldn't be. This commit is unreviewed, but has been a big help here. Previously my boxes would panic pretty much on the first fsync() that wrote something to disk.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Jan 13 07:20:01 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +14 -4 lines
Because cylinder group blocks are now written in background, it is no longer sufficient to get a lock on a buffer to know that its write has been completed. We have to first get the lock on the buffer, then check to see if it is doing a background write. If it is doing background write, we have to wait for the background write to finish, then check to see if that fullfilled our dependency, and if not to start another write. Luckily the explanation is longer than the fix.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Jan 13 07:17:39 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +8 -5 lines
A panic occurs during an fsync when a dirty block associated with a vnode has not been written (which would clear certain of its dependencies). The problems arises because fsync with MNT_NOWAIT no longer pushes all the dirty blocks associated with a vnode. It skips those that require rollbacks, since they will just get instantly dirty again. Such skipped blocks are marked so that they will not be skipped a second time (otherwise circular dependencies would never clear). So, we fsync twice to ensure that everything will be written at least once.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Jan 11 06:52:35 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +33 -30 lines
We cannot proceed to free the blocks of the file until the dependencies have been cleaned up by deallocte_dependencies(). Once that is done, it is safe to post the request to free the blocks. A similar change is also needed for the freefile case.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Jan 10 12:03:57 2000 UTC (12 years, 1 month ago) by phk
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -4 lines
Give vn_isdisk() a second argument where it can return a suitable errno. Suggested by: bde
Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Jan 10 08:39:03 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +6 -4 lines
Missing FREE_LOCK call before handle_workitem_freeblocks. Submitted by: "Kenneth D. Merry" <ken@kdm.org>
Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Jan 10 00:24:14 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +186 -58 lines
Several performance improvements for soft updates have been added: 1) Fastpath deletions. When a file is being deleted, check to see if it was so recently created that its inode has not yet been written to disk. If so, the delete can proceed to immediately free the inode. 2) Background writes: No file or block allocations can be done while the bitmap is being written to disk. To avoid these stalls, the bitmap is copied to another buffer which is written thus leaving the original available for futher allocations. 3) Link count tracking. Constantly track the difference in i_effnlink and i_nlink so that inodes that have had no change other than i_effnlink need not be written. 4) Identify buffers with rollback dependencies so that the buffer flushing daemon can choose to skip over them.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Jan 9 23:35:38 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +23 -21 lines
Keep tighter control of removal dependencies by limiting the number of dirrem structure rather than the collaterally created freeblks and freefile structures. Limit the rate of buffer dirtying by the syncer process during periods of intense file removal.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Jan 9 23:14:57 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +23 -27 lines
Reorganize softdep_fsync so that it only does the inode-is-flushed check before the inode is unlocked while grabbing its parent directory. Once it is unlocked, other operations may slip in that could make the inode-is-flushed check fail. Allowing other writes to the inode before returning from fsync does not break the semantics of fsync since we have flushed everything that was dirty at the time of the fsync call.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Jan 9 22:40:09 2000 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +13 -7 lines
Make static non-exported functions from soft updates.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Dec 16 22:02:09 1999 UTC (12 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
The function request_cleanup() had a tsleep() with PCATCH. It is quite dangerous, since the process may hold locks at the point, and if it is stopped in that tsleep the machine may hang. Because the sleep is so short, the PCATCH is not required here, so it has been removed. For the future, the FreeBSD team needs to decide whether it is still reasonable to stop a process in tsleep, as that may affect any other code that uses PCATCH while holding kernel locks. Submitted by: Dmitrij Tejblum <tejblum@arc.hq.cti.ru> Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Dec 11 16:12:49 1999 UTC (12 years, 2 months ago) by eivind
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -2 lines
Lock reporting and assertion changes. * lockstatus() and VOP_ISLOCKED() gets a new process argument and a new return value: LK_EXCLOTHER, when the lock is held exclusively by another process. * The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them * Extend the vnode_if.src format to allow more exact specification than locked/unlocked. This commit should not do any semantic changes unless you are using DEBUG_VFS_LOCKS. Discussed with: grog, mch, peter, phk Reviewed by: peter
Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Nov 22 10:33:55 1999 UTC (12 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -5 lines
Convert various pieces of code to use vn_isdisk() rather than checking for vp->v_type == VBLK. In ccd: we don't need to call VOP_GETATTR to find the type of a vnode. Reviewed by: sos
Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Nov 20 10:00:37 1999 UTC (12 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -3 lines
struct mountlist and struct mount.mnt_list have no business being a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively. This removes ugly mp != (void*)&mountlist comparisons. Requested by: phk Submitted by: Jake Burkholder jake@checker.org PR: 14967
Revision 1.34.2.3: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:22:08 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.34.2.2: preferred, colored
Changes since revision 1.34.2.2: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.34.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 29 14:31:23 1999 UTC (12 years, 5 months ago) by mckay
Branches: RELENG_3
Diff to: previous 1.34.2.1: preferred, colored
Changes since revision 1.34.2.1: +297 -141 lines
MFC (up to rev 1.27): Better performance at times of high rates of file creation or deletion. OK'd by: jkh
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Aug 28 02:16:29 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Aug 8 18:42:34 1999 UTC (12 years, 6 months ago) by phk
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2 lines
Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>, a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
Revision 1.34.4.1: download - view: text, markup, annotated - select for diffs
Sat Jul 3 21:55:41 1999 UTC (12 years, 7 months ago) by jdp
Branches: RELENG_3_2_PAO
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +180 -421 lines
Add soft-updates sources in new location on the RELENG_3_2_PAO branch.
Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 3 21:40:59 1999 UTC (12 years, 7 months ago) by jdp
Branches: RELENG_3
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +180 -421 lines
Add RELENG_3 versions of the soft-updates sources in their new location. Their history can be found in the oldRELENG_3 branch.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Jun 29 15:57:40 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Branch point for: RELENG_3_2_PAO, RELENG_3
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +1 -2 lines
No longer need to set B_ASYNC flag since BUF_KERNPROC now unconditionally sets the identity of the buffer.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Jun 27 13:26:23 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -3 lines
Keep the inlines for <sys/buf.h> happy..
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Jun 26 02:46:35 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +13 -9 lines
Convert buffer locking from using the B_BUSY and B_WANTED flags to using lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Jun 16 23:27:55 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +14 -12 lines
Add a vnode argument to VOP_BWRITE to get rid of the last vnode operator special case. Delete special case code from vnode_if.sh, vnode_if.src, umap_vnops.c, and null_vnops.c.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Jun 15 23:37:29 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +45 -41 lines
Get rid of the global variable rushjob and replace it with a function in kern/vfs_subr.c named speedup_syncer() which handles the speedup request. Change the various clients of rushjob to use the new function.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat May 22 04:43:04 1999 UTC (12 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +17 -10 lines
Cosmetic changes to make it compile without errors in gcc -Wall
Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri May 14 01:26:46 1999 UTC (12 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +97 -28 lines
Add a hook to ffs_fsync to allow soft updates to get first chance at doing a sync on the block device for the filesystem. That allows it to push the bitmap blocks before the inode blocks which greatly reduces the number of inode rollbacks that need to be done.
Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Wed May 12 02:13:03 1999 UTC (12 years, 9 months ago) by dg
Branches: oldRELENG_3
CVS tags: oldRELENG_3_2_PAO_BP, oldRELENG_3_2_PAO, oldRELENG_3_2_0_RELEASE
Diff to: previous 1.20.2.1: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.2.1: +63 -14 lines
Updated to rev 1.24 of ffs_softdep.c. Includes various fixes but not the most recent performance optimization (which hasn't had enough testing yet). Approved by: jkh
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun May 9 19:39:54 1999 UTC (12 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +5 -3 lines
Put back changes that might be causing trouble on Alpha.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri May 7 05:11:31 1999 UTC (12 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +10 -38 lines
Get rid of random debugging cruft; sync up with latest version.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri May 7 02:26:47 1999 UTC (12 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +290 -108 lines
Severe slowdowns have been reported when creating or removing many files at once on a filesystem running soft updates. The root of the problem is that soft updates limits the amount of memory that may be allocated to dependency structures so as to avoid hogging kernel memory. The original algorithm just waited for the disk I/O to catch up and reduce the number of dependencies. This new code takes a much more aggressive approach. Basically there are two resources that routinely hit the limit. Inode dependencies during periods with a high file creation rate and file and block removal dependencies during periods with a high file removal rate. I have attacked these problems from two fronts. When the inode dependency limits are reached, I pick a random inode dependency, UFS_UPDATE it together with all the other dirty inodes contained within its disk block and then write that disk block. This trick usually clears 5-50 inode dependencies in a single disk I/O. For block and file removal dependencies, I pick a random directory page that has at least one remove pending and VOP_FSYNC its directory. That releases all its removal dependencies to the work queue. To further hasten things along, I also immediately start the work queue process rather than waiting for its next one second scheduled run.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Mar 2 06:38:07 1999 UTC (12 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +9 -3 lines
Reorganize locking to avoid holding the lock during calls to bdwrite and brelse (which may sleep in some systems). Obtained from: Matthew Dillon <dillon@apollo.backplane.com>
Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Mar 2 00:19:47 1999 UTC (12 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +45 -3 lines
Ensure that softdep_sync_metadata can handle bmsafemap and mkdir entries if they ever arise (which should not happen as softdep_sync_metadata is currently used).
Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Feb 17 20:01:20 1999 UTC (12 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +13 -12 lines
fix double LIST_REMOVE; other cosmetic changes to match version 9.32. Obtained from: Jeffrey Hsu <hsu@FreeBSD.ORG>
Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 25 01:44:59 1999 UTC (13 years ago) by dg
Branches: oldRELENG_3
CVS tags: oldRELENG_3_1_0_RELEASE
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -41 lines
Brought in fix from rev 1.21: softdep_deallocate_dependencies() reduced to a panic.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Jan 22 09:07:32 1999 UTC (13 years ago) by dg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -41 lines
Gutted softdep_deallocate_dependencies and replaced it with a panic. It turns out to not be useful to unwind the dependencies and continue in the face of a fatal error. Also changed the log() to a printf() in softdep_error() so that it will be output in the case of a impending panic. Submitted by: Kirk McKusick <mckusick@mckusick.com>
Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jan 7 16:14:10 1999 UTC (13 years, 1 month ago) by bde
Branches: MAIN
CVS tags: oldRELENG_3_BP
Branch point for: oldRELENG_3
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +22 -16 lines
Don't pass unused unused timestamp args to UFS_UPDATE() or waste time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes().
Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Jan 6 18:18:04 1999 UTC (13 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +5 -5 lines
UFS_UPDATE() takes a boolean `waitfor' arg, so don't pass it the value MNT_WAIT when we mean boolean `true' or check for that value not being passed. There was no problem in practice because MNT_WAIT had the magic value of 1.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Dec 10 20:11:47 1998 UTC (13 years, 2 months ago) by julian
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -9 lines
Remove some compiler warnings.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Oct 31 15:33:32 1998 UTC (13 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +8 -8 lines
Change dirty block list handling to use TAILQ macros.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Oct 28 10:37:54 1998 UTC (13 years, 3 months ago) by jkh
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
Clarify a rather ambiguous debugging message.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Oct 3 19:17:11 1998 UTC (13 years, 4 months ago) by nate
Branches: MAIN
CVS tags: oldRELENG_3_0_0_RELEASE
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +10 -1 lines
Fix 'noatime' bug that was unrelated to use of noatime. The problem is caused when a directory block is compacted. When this occurs, softdep_change_directoryentry_offset() is called to relocate each directory entry and adjust its matching diradd structure, if any, to match the new location of the entry. The bug is that while softdep_change_directoryentry_offset() correctly adjusts the offsets of the diradd structures on the pd_diraddhd[] lists (which are not yet ready to be committed to disk), it fails to adjust the offsets of the diradd structures on the pd_pendinghd list (which are ready to be committed to disk). This causes the dependency structures to be inconsistent with the buf contents. Now, if the compaction has moved a directory entry to the same offset as one of the diradd structures on the pd_pendinghd list *and* a syscall is done that tries to remove this directory entry before this directory block has been written to disk (which would empty pd_pendinghd), a sanity check in newdirrem() will call panic() when it notices that the inode number in the entry that it is to be removed doesn't match the inode number in the diradd structure with that offset of that entry. Reviewed by: Kirk McKusick <mckusick@McKusick.COM> Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Sep 24 15:02:46 1998 UTC (13 years, 4 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1 lines
Eliminate a race in VOP_FSYNC() when softupdates is enabled. Submitted by: Kirk McKusick <mckusick@McKusick.COM> Two minor changes are also included, 1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set, vn_lock should always succeed in these cases. 2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount a little more unstable. It also keeps us in sync with other BSDs. Suggested by: Bruce Evans <bde@zeta.org.au>
Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Aug 12 20:46:47 1998 UTC (13 years, 6 months ago) by julian
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +27 -2 lines
Handle the case of moving a directory onto the top of a sibling's child of the same name. Submitted by: Kirk Mckusick with fixes from luoqi Chen Obtained from: Whistle test tree.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Jun 12 21:21:26 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
Note which version of Kirk's sources this corresponds to.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jun 12 20:48:30 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +43 -22 lines
Fix the case when renaming to a file that you've just created and deleted, that had an inode that has not yet been written to disk, when the inode of the new file is also not yet written to disk, and your old directory entry is not yet on disk but you need to remove it and the new name exists in memory but has been deleted but the transaction to write the deleted name to disk exists and has not yet been cancelled by the request to delete the non existant name. I don't know how kirk could have missed such a glaring problem for so long. :-) Especially since the inconsitency survived on the disk for a whole 4 second on average before being fixed by other code. This was not a crashing bug but just led to filesystem inconsitencies if you crashed. Submitted by: Kirk McKusick (mckusick@mckusick.com)
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jun 11 17:44:32 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -4 lines
Add B_NOCACHE to several cases where BSD4.4 only required a B_INVAL. Change worked out by john and kirk in consort.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jun 10 20:45:46 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +27 -20 lines
Fix for "live inode" panic. Submitted by: Kirk McKusick <mckusick@McKusick.COM> Reviewed by: yeah right...
Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jun 10 20:03:16 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -43 lines
Remove buggy debugging code.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed May 27 03:32:23 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -1 lines
A fix to a debug test from Kirk.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue May 19 23:07:22 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +83 -5 lines
Bring up-to-date with Whistle's current version Includes some debugging code.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue May 19 22:54:53 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +86 -88 lines
Merge with Kirk's version as of Feb 20 His version 9.23 == our version 1.5 of ffs_softdep.c His version 9.5 == our version 1.4 of softdep.c
Revision 1.1.1.6 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 22:53:24 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Feb20-98-ALPHA
Diff to: previous 1.1.1.5: preferred, colored
Changes since revision 1.1.1.5: +236 -183 lines
Bring in Kirk's Feb 20 version of ffs_softdep.c where we merged our sources.. His version 9.23 == our version 1.5 of ffs_softdep.c His version 9.5 == our version 1.4 of softdep.h
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue May 19 21:45:50 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +196 -50 lines
Merge in Kirk's changes to stop softupdates from hogging all of memory.
Revision 1.1.1.5 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 21:40:43 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Feb13-98-ALPHA
Diff to: previous 1.1.1.4: preferred, colored
Changes since revision 1.1.1.4: +109 -5 lines
Changes to avoid soft updates using all of RAM. ncludes some tuenable (via sysctl) parameters.
Revision 1.1.1.4 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 21:14:13 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Feb12-98-ALPHA
Diff to: previous 1.1.1.3: preferred, colored
Changes since revision 1.1.1.3: +18 -7 lines
Fix a memory leak in last fix.
Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 21:05:06 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Feb11-98-ALPHA
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +25 -11 lines
Import changes from kirk which will appear in the Feb 13 snapshot.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue May 19 20:50:41 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -7 lines
Change to stop a silly panic. This should be understood better. Change a buffer swizzle trick to a bcopy. It would be nice if the efficient trick could be used in the future.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 19 20:18:40 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +356 -220 lines
First published FreeBSD version of soft updates Feb 5.
Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 20:03:28 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Jan29-98-ALPHA
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +203 -111 lines
Import the next version received from kirk after some FreeBSD feedback.
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 19 19:47:21 1998 UTC (13 years, 8 months ago) by julian
Branches: McKusick
CVS tags: Jan26-97-ALPHA
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Import the earliest version of the soft update code that I have.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 19 19:47:21 1998 UTC (13 years, 8 months ago) by julian
Branches: MAIN
Initial revision
