Commit Graph

16 Commits

Author SHA1 Message Date
Anton Altaparmakov
bfab36e816 NTFS: Fix a mount time deadlock.
Big thanks go to Mathias Kolehmainen for reporting the bug, providing
debug output and testing the patches I sent him to get it working.

The fix was to stop calling ntfs_attr_set() at mount time as that causes
balance_dirty_pages_ratelimited() to be called which on systems with
little memory actually tries to go and balance the dirty pages which tries
to take the s_umount semaphore but because we are still in fill_super()
across which the VFS holds s_umount for writing this results in a
deadlock.

We now do the dirty work by hand by submitting individual buffers.  This
has the annoying "feature" that mounting can take a few seconds if the
journal is large as we have clear it all.  One day someone should improve
on this by deferring the journal clearing to a helper kernel thread so it
can be done in the background but I don't have time for this at the moment
and the current solution works fine so I am leaving it like this for now.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-12 09:16:30 -07:00
Richard Knutsson
c49c311150 [PATCH] fs/ntfs: Conversion to generic boolean
Conversion of booleans to: generic-boolean.patch (2006-08-23)

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:19 -07:00
Anton Altaparmakov
67b1dfe77a NTFS: Fix an (innocent) off-by-one error in the runlist code.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2006-03-23 14:57:43 +00:00
Anton Altaparmakov
eed8b2dee7 NTFS: More runlist handling fixes from Richard Russon and myself.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-20 14:19:30 +01:00
Anton Altaparmakov
5c9f6de3b8 NTFS: Fix various bugs in the runlist merging code. (Based on libntfs
changes by Richard Russon.)

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-19 09:33:40 +01:00
Anton Altaparmakov
6e48321a40 NTFS: Add ntfs_rl_punch_nolock() which punches a caller specified hole into a runlist.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-08 20:26:34 +01:00
Anton Altaparmakov
3ffc5a4438 NTFS: Change ntfs_rl_truncate_nolock() to throw away the runlist if the new
length is zero.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-08 20:23:06 +01:00
Anton Altaparmakov
2b0ada2b8e NTFS: Fix handling of valid but empty mapping pairs array in
fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-08 16:52:31 +01:00
Anton Altaparmakov
84d6ebe63f NTFS: Fix two nasty runlist merging bugs that had gone unnoticed so far.
Thanks to Stefano Picerno for the bug report.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-08 16:46:55 +01:00
Anton Altaparmakov
9529d461d0 NTFS: Use ntfs_malloc_nofs_nofail() in runlist.c::ntfs_runlists_merge()
in the two critical regions.  This means we no longer need to
      panic() when the allocation fails as it now cannot fail.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-09-08 16:33:12 +01:00
Anton Altaparmakov
fa3be92317 NTFS: Add an extra parameter @last_vcn to ntfs_get_size_for_mapping_pairs()
and ntfs_mapping_pairs_build() to allow the runlist encoding to be
      partial which is desirable when filling holes in sparse attributes.
      Update all callers.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-06-25 17:15:36 +01:00
Anton Altaparmakov
53d59aad93 NTFS: Fix compilation when configured read-only.
- Add ifdef NTFS_RW around write specific code if fs/ntfs/runlist.[hc] and
  fs/ntfs/attrib.[hc].
- Minor bugfix to fs/ntfs/attrib.c::ntfs_attr_make_non_resident() where the
  runlist was not freed in all error cases.
- Add fs/ntfs/runlist.[hc]::ntfs_rl_find_vcn_nolock().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-05-05 11:39:30 +01:00
Anton Altaparmakov
c0c1cc0e46 NTFS: - Fix bug in fs/ntfs/attrib.c::ntfs_find_vcn_nolock() where after
dropping the read lock and taking the write lock we were not checking
        whether someone else did not already do the work we wanted to do.
      - Rename ntfs_find_vcn_nolock() to ntfs_attr_find_vcn_nolock().
      - Tidy up some comments in fs/ntfs/runlist.c.
      - Add LCN_ENOMEM and LCN_EIO definitions to fs/ntfs/runlist.h.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-05-05 11:20:49 +01:00
Anton Altaparmakov
37e4c13b98 NTFS: Fix a nasty runlist merge bug when merging two holes.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-05-05 11:03:01 +01:00
Anton Altaparmakov
1a0df15acd NTFS: Fix a bug in fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress() in
the creation of the unmapped runlist element for the base attribute
      extent.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-05-05 10:54:37 +01:00
Linus Torvalds
1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00