Commit graph android_kernel_sony_sdm845/fs
Message SHA1
NTFS: Update attribute definition handling.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:46:17 +01:00
bb3cf33509
NTFS: Some utilities modify the boot sector but do not update the checksum.
Thus, relax the checking in fs/ntfs/super.c::is_boot_sector_ntfs() to
      only emit a warning when the checksum is incorrect rather than
      refusing the mount.  Thanks to Bernd Casimir for pointing this
      problem out.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:44:41 +01:00
b0d2374d62
NTFS: Remove checks for NULL before calling kfree() since kfree() does the
checking itself.  (Jesper Juhl)

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Jesper Juhl   authored and   Anton Altaparmakov   commited 2005-05-05 11:42:27 +01:00
251c8427c9
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>

Anton Altaparmakov   commited 2005-05-05 11:39:30 +01:00
53d59aad93
NTFS: Include linux/swap.h in fs/ntfs/attrib.c for mark_page_accessed().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:27:45 +01:00
1ef334d372
NTFS: - Modify ->readpage and ->writepage (fs/ntfs/aops.c) so they detect
and handle the case where an attribute is converted from resident
        to non-resident by a concurrent file write.
      - Reorder some operations when converting an attribute from resident
        to non-resident (fs/ntfs/attrib.c) so it is safe wrt concurrent
        ->readpage and ->writepage.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:26:01 +01:00
905685f68f
NTFS: Fix sign of various error return values to be negative in
fs/ntfs/lcnalloc.c.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:23:20 +01:00
43b01fda8b
NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_make_non_resident().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:22:07 +01:00
2bfb4fff3e
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>

Anton Altaparmakov   commited 2005-05-05 11:20:49 +01:00
c0c1cc0e46
NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_vcn_to_lcn_nolock() used by the new
write code.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:18:43 +01:00
271849a988
NTFS: Add AT_EA in addition to AT_DATA to whitelist for being allowed to be
non-resident in fs/ntfs/attrib.c::ntfs_attr_can_be_non_resident().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:17:08 +01:00
7e693073a9
NTFS: Correct sparse file handling. The compressed values need to be
checked and set in the ntfs inode as done for compressed files
      and the compressed size needs to be used for vfs inode->i_blocks
      instead of the allocated size, again, as done for compressed files.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:15:46 +01:00
9451f8519c
NTFS: Make fs/ntfs/namei.c::ntfs_get_{parent,dentry} static and move the
definition of ntfs_export_ops from fs/ntfs/super.c to namei.c.
      Also, declare ntfs_export_ops in fs/ntfs/ntfs.h.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:13:56 +01:00
413826868f
NTFS: Fix printk format warnings on ia64. (Randy Dunlap)
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Randy Dunlap   authored and   Anton Altaparmakov   commited 2005-05-05 11:11:47 +01:00
8907547d4b
NTFS: - Set the ntfs_inode->allocated_size to the real allocated size in the
mft record for resident attributes (fs/ntfs/inode.c).
      - Small readability cleanup to use "a" instead of "ctx->attr"
        everywhere (fs/ntfs/inode.c).

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:04:54 +01:00
5ae9fcf8f3
NTFS: Fix a nasty runlist merge bug when merging two holes.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:03:01 +01:00
37e4c13b98
NTFS: Change time to u64 in time.h::ntfs2utc() as it otherwise generates a
warning in the do_div() call on sparc32.  Thanks to Meelis Roos for the
      report and analysis of the warning.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 11:01:13 +01:00
d8ec785e0b
NTFS: - Split ntfs_map_runlist() into ntfs_map_runlist() and a non-locking
helper ntfs_map_runlist_nolock() which is used by ntfs_map_runlist().
	This allows us to map runlist fragments with the runlist lock already
	held without having to drop and reacquire it around the call.  Adapt
	all callers.
      - Change ntfs_find_vcn() to ntfs_find_vcn_nolock() which takes a locked
	runlist.  This allows us to find runlist elements with the runlist
	lock already held without having to drop and reacquire it around the
	call.  Adapt all callers.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:56:31 +01:00
b6ad6c52fe
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>

Anton Altaparmakov   commited 2005-05-05 10:54:37 +01:00
1a0df15acd
NTFS: - Add disable_sparse mount option together with a per volume sparse
enable bit which is set appropriately and a per inode sparse disable
	bit which is preset on some system file inodes as appropriate.
      - Enforce that sparse support is disabled on NTFS volumes pre 3.0.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:53:01 +01:00
c002f42543
NTFS: Optimise/reorganise some error handling code in fs/ntfs/aops.c.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:48:11 +01:00
f40661be03
NTFS: Fixup the resident attribute resizing code in
fs/ntfs/aops.c::ntfs_{prepare,commit}_write()() and re-enable it.
      It should be safe now.  (Famous last words...)

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:47:05 +01:00
946929d813
NTFS: Fix stupid bug in fs/ntfs/mft.c introduced in last changeset.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:45:36 +01:00
3834c3f227
NTFS: Repeat a failed ntfs_truncate() in fs/ntfs/aops.c::ntfs_writepage()
and abort if it fails again.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:43:29 +01:00
149f0c5200
NTFS: Use i_size_{read,write}() in fs/ntfs/{aops.c,mft.c} and protect
access to the i_size and other size fields using the size_lock.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:39:08 +01:00
07a4e2da7d
NTFS: Use i_size_read() in fs/ntfs/inode.c once and then use the cached value
afterwards when reading the size of the bitmap inode.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:37:22 +01:00
f50f3ac519
NTFS: - Use i_size_read() in fs/ntfs/super.c once and then use the cached
value afterwards.  Cache the initialized_size in the same way and
	protect access to the two sizes using the size_lock.
      - Minor optimization to fs/ntfs/super.c::ntfs_statfs() and its helpers.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:34:45 +01:00
218357ff1b
NTFS: In fs/ntfs/dir.c, use i_size_read() once and then the cached value
afterwards.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:32:43 +01:00
206f9f35b2
NTFS: - In fs/ntfs/compress.c, use i_size_read() at the start and then use the
cached value everywhere.  Cache the initialized_size in the same way
	and protect the critical region where the two sizes are read using the
	new size_lock of the ntfs inode.
      - Add the new size_lock to the ntfs_inode structure (fs/ntfs/inode.h)
	and initialize it (fs/ntfs/inode.c).

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-05 10:30:29 +01:00
367636772f
Merge with /usr/src/ntfs-2.6.git
Anton Altaparmakov   commited 2005-05-05 00:08:35 +01:00
36050271e6
JFS: Fix sparse warning
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

Dave Kleikamp   commited 2005-05-04 15:31:14 -05:00
7a694ca749
JFS: cleanup - remove unneeded sanity check
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

Dave Kleikamp   commited 2005-05-04 15:30:51 -05:00
dcc9871270
JFS: fix sparse warnings by moving extern declarations to headers
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

Dave Kleikamp   commited 2005-05-04 15:29:35 -05:00
1868f4aa5a
NTFS: Use i_size_read() in fs/ntfs/file.c::ntfs_file_open().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-04 17:02:25 +01:00
d4b9ba7bf6
NTFS: Use i_size_read() once and then use the cached value in
fs/ntfs/lcnalloc.c::ntfs_cluster_alloc().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-04 17:00:18 +01:00
db30d160cd
NTFS: Use i_size_read() in fs/ntfs/logfile.c::ntfs_{check,empty}_logfile().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-04 16:57:47 +01:00
66129f88c4
JFS: Endian errors
Thanks sparse!

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

Dave Kleikamp   commited 2005-05-04 09:11:49 -05:00
6b6bf51081
NTFS: Use i_size_read() in fs/ntfs/attrib.c::ntfs_attr_set().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-05-04 14:24:16 +01:00
da28438cae
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
David Woodhouse   commited 2005-05-03 08:14:09 +01:00
27b030d58c
[PATCH] JFS: Don't allocate extents that overlap existing extents
Modify xtSearch so that it returns the next allocated block when the
requested block is unmapped.  This can be used to make sure we don't
create a new extent that overlaps the next one.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:54 -07:00
6628465e33
[PATCH] JFS: Write journal sync points more often
This patch adds jfs_syncpt, which calls lmLogSync to write sync points
to the journal both in jfs_sync_fs and when sync barrier processing
completes.

lmLogSync accomplishes two things:  1) it pushes logged-but-dirty
metadata pages to disk, and 2) it writes a sync record to the journal
so that jfs_fsck doesn't need to replay more transactions than is
necessary.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:53 -07:00
1c6278295d
[PATCH] JFS: Support page sizes greater than 4K
jfs has never worked on architecutures where the page size was not 4K.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:53 -07:00
7fab479beb
[PATCH] JFS: Changes for larger page size
JFS code has always assumed a page size of 4K.  This patch fixes the
non-pagecache uses of pages to deal with larger pages.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:53 -07:00
dc5798d9a7
[PATCH] JFS: Simplify creation of new iag
JFS was creating a new IAG (inode aggregate group) in one address
space, and afterwards, accessing it from another.  This could lead to
complications when cache pages contain more than one page of jfs
metadata.  This patch causes the IAG to be initialized in the same
address space that it is subsequently accessed with.

This also elimitates an I/O, but IAG's aren't created too often.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:53 -07:00
d2e83707ed
[PATCH] JFS: reduce number of synchronous transactions
Use an inline pxd list rather than an xad list in the xadlock.
When the number of extents being modified can fit with the xadlock,
a transaction can be committed asynchronously.  Using a list of
pxd's instead of xad's allows us to fit 4 extents, rather than 2.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Kleikamp   authored and   Linus Torvalds   commited 2005-05-02 22:23:52 -07:00
66f3131f54
[PATCH] DocBook: fix some descriptions
Some KernelDoc descriptions are updated to match the current code.
No code changes.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Martin Waitz   authored and   Linus Torvalds   commited 2005-05-01 08:59:26 -07:00
67be2dd1ba
[PATCH] DocBook: changes and extensions to the kernel documentation
I have recompiled Linux kernel 2.6.11.5 documentation for me and our
university students again.  The documentation could be extended for more
sources which are equipped by structured comments for recent 2.6 kernels.  I
have tried to proceed with that task.  I have done that more times from 2.6.0
time and it gets boring to do same changes again and again.  Linux kernel
compiles after changes for i386 and ARM targets.  I have added references to
some more files into kernel-api book, I have added some section names as well.
 So please, check that changes do not break something and that categories are
not too much skewed.

I have changed kernel-doc to accept "fastcall" and "asmlinkage" words reserved
by kernel convention.  Most of the other changes are modifications in the
comments to make kernel-doc happy, accept some parameters description and do
not bail out on errors.  Changed <pid> to @pid in the description, moved some
#ifdef before comments to correct function to comments bindings, etc.

You can see result of the modified documentation build at
  http://cmp.felk.cvut.cz/~pisa/linux/lkdb-2.6.11.tar.gz

Some more sources are ready to be included into kernel-doc generated
documentation.  Sources has been added into kernel-api for now.  Some more
section names added and probably some more chaos introduced as result of quick
cleanup work.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Pavel Pisa   authored and   Linus Torvalds   commited 2005-05-01 08:59:25 -07:00
4dc3b16ba1
[PATCH] ext3: remove unnecessary race then retry in ext3_get_block
The extra race-with-truncate-then-retry logic around
ext3_get_block_handle(), which was inherited from ext2, becomes unecessary
for ext3, since we have already obtained the ei->truncate_sem in
ext3_get_block_handle() before calling ext3_alloc_branch().  The
ei->truncate_sem is already there to block concurrent truncate and block
allocation on the same inode.  So the inode's indirect addressing tree
won't be changed after we grab that semaphore.

We could, after get the semaphore, re-verify the branch is up-to-date or
not.  If it has been changed, then get the updated branch.  If we still
need block allocation, we will have a safe version of the branch to work
with in the ext3_find_goal()/ext3_splice_branch().

The code becomes more readable after remove those retry logic.  The patch
also clean up some gotos in ext3_get_block_handle() to make it more
readable.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Mingming Cao   authored and   Linus Torvalds   commited 2005-05-01 08:59:20 -07:00
fe55c45236
[PATCH] reiserfs endianness: comp_short_keys() cleanup
comp_short_keys() massaged into sane form, which kills the last place where
pointer to in_core_key (or any object containing such) would be cast to or
from something else.  At that point we are free to change layout of
in_core_key - nothing depends on it anymore.

So we drop the mess with union in there and simply use (unconditional) __u64
k_offset and __u8 k_type instead; places using in_core_key switched to those.
That gives _far_ better code than current mess - on all platforms.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Al Viro   authored and   Linus Torvalds   commited 2005-05-01 08:59:19 -07:00
6b9f5829e6
[PATCH] reiserfs endianness: fix endianness bugs
fixes for a couple of bugs exposed by the above: le32_to_cpu() used on 16bit
value and missing conversion in comparison of host- and little-endian values.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Al Viro   authored and   Linus Torvalds   commited 2005-05-01 08:59:18 -07:00
b8cc936f62