Age | Commit message (Collapse) | Author | Files | Lines |
|
When doing direct writes we store the checksums in the ordered sum stuff in the
ordered extent for writing them when the write completes, so we don't even use
the dip->csums array. So if we're writing, don't bother allocating dip->csums
since we won't use it anyway. Thanks,
Signed-off-by: Josef Bacik <[email protected]>
|
|
This patch makes the free space cluster refilling code a little easier to
understand, and fixes some things with the bitmap part of it. Currently we
either want to refill a cluster with
1) All normal extent entries (those without bitmaps)
2) A bitmap entry with enough space
The current code has this ugly jump around logic that will first try and fill up
the cluster with extent entries and then if it can't do that it will try and
find a bitmap to use. So instead split this out into two functions, one that
tries to find only normal entries, and one that tries to find bitmaps.
This also fixes a suboptimal thing we would do with bitmaps. If we used a
bitmap we would just tell the cluster that we were pointing at a bitmap and it
would do the tree search in the block group for that entry every time we tried
to make an allocation. Instead of doing that now we just add it to the clusters
group.
I tested this with my ENOSPC tests and xfstests and it survived.
Signed-off-by: Josef Bacik <[email protected]>
|
|
Now that the buffer cache has it's own LRU, we do not need to use
the page cache to provide persistent caching and reclaim
infrastructure. Convert the buffer cache to use alloc_pages()
instead of the page cache. This will remove all the overhead of page
cache management from setup and teardown of the buffers, as well as
needing to mark pages accessed as we find buffers in the buffer
cache.
By avoiding the page cache, we also remove the need to keep state in
the page_private(page) field for persistant storage across buffer
free/buffer rebuild and so all that code can be removed. This also
fixes the long-standing problem of not having enough bits in the
page_private field to track all the state needed for a 512
sector/64k page setup.
It also removes the need for page locking during reads as the pages
are unique to the buffer and nobody else will be attempting to
access them.
Finally, it removes the buftarg address space lock as a point of
global contention on workloads that allocate and free buffers
quickly such as when creating or removing large numbers of inodes in
parallel. This remove the 16TB limit on filesystem size on 32 bit
machines as the page index (32 bit) is no longer used for lookups
of metadata buffers - the buffer cache is now solely indexed by disk
address which is stored in a 64 bit field in the buffer.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
During mount, we can do a quotacheck that involves a bulkstat pass
on all inodes. If there are more inodes in the filesystem than can
be held in memory, we require the inode cache shrinker to run to
ensure that we don't run out of memory.
Unfortunately, the inode cache shrinker is not registered until we
get to the end of the superblock setup process, which is after a
quotacheck is run if it is needed. Hence we need to register the
inode cache shrinker earlier in the mount process so that we don't
OOM during mount. This requires that we also initialise the syncd
work before we register the shrinker, so we nee dto juggle that
around as well.
While there, make sure that we have set up the block sizes in the
VFS superblock correctly before the quotacheck is run so that any
inodes that are cached as a result of the quotacheck have their
block size fields set up correctly.
Cc: [email protected]
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
When inside a transaction and we fail to read a buffer,
xfs_trans_read_buf returns a null buffer pointer and no error.
xfs_do_da_buf() checks the error return, but not the buffer, and as
a result this read failure condition causes a panic when it attempts
to dereference the non-existant buffer.
Make xfs_trans_read_buf() return the same error for this situation
regardless of whether it is in a transaction or not. This means
every caller does not need to check both the error return and the
buffer before proceeding to use the buffer.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
There is an ABBA deadlock between synchronous inode flushing in
xfs_reclaim_inode and xfs_icluster_free. xfs_icluster_free locks the
buffer, then takes inode ilocks, whilst synchronous reclaim takes
the ilock followed by the buffer lock in xfs_iflush().
To avoid this deadlock, separate the inode cluster buffer locking
semantics from the synchronous inode flush semantics, allowing
callers to attempt to lock the buffer but still issue synchronous IO
if it can get the buffer. This requires xfs_iflush() calls that
currently use non-blocking semantics to pass SYNC_TRYLOCK rather
than 0 as the flags parameter.
This allows xfs_reclaim_inode to avoid the deadlock on the buffer
lock and detect the failure so that it can drop the inode ilock and
restart the reclaim attempt on the inode. This allows
xfs_ifree_cluster to obtain the inode lock, mark the inode stale and
release it and hence defuse the deadlock situation. It also has the
pleasant side effect of avoiding IO in xfs_reclaim_inode when it
tries to next reclaim the inode as it is now marked stale.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
On 32 bit systems, vmalloc space is limited and XFS can chew through
it quickly as the vmalloc space is lazily freed. This can result in
failure to map buffers, even when there is apparently large amounts
of vmalloc space available. Hence, if we fail to map a buffer, purge
the aliases that have not yet been freed to hopefuly free up enough
vmalloc space to allow a retry to succeed.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
Preallocation and hole punch transactions are currently synchronous
and this is causing performance problems in some cases. The
transactions don't need to be synchronous as we don't need to
guarantee the preallocation is persistent on disk until a
fdatasync, fsync, sync operation occurs. If the file is opened
O_SYNC or O_DATASYNC, only then should the transaction be issued
synchronously.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Chris Metcalf <[email protected]>
LKML-Reference: <[email protected]>
|
|
Converted with coccinelle.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Chris Metcalf <[email protected]>
LKML-Reference: <[email protected]>
|
|
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
|
|
Fix sparse warning:
arch/x86/kernel/kgdb.c:123:9: warning: switch with no cases
Reported-by: Namhyung Kim <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
|
|
It's better to use macro KDB_BASE_CMD_MAX instead of 50
Signed-off-by: Jovi Zhang <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
|
|
This is an off by one because strlen() doesn't count the null
terminator. We strcpy() these strings into an array of size
MAX_CONFIG_LEN.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
|
|
Convert to the new irq chip functions and cleanup the name space.
[ Guennadi reported: irq_data_get_chip_data is undefined. Yes, I screwed up.
it needs to be irq_data_get_irq_chip_data ]
Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Guennadi Liakhovetski <[email protected]>
Cc: Dan Williams <[email protected]>
LKML-Reference: <[email protected]>
|
|
Here's a set of changes updating Documentation/development-process. I have
update kernel releases and relevant statistics, added information for a
couple of tools, zapped some trailing white space, and generally tried to
make it more closely match the current state of affairs.
[Typo fixes from Joe Perches and Nicolas Kaiser incorporated]
Signed-off-by: Jonathan Corbet <[email protected]>
Acked-by: Greg KH <[email protected]>
Cc: Randy Dunlap <[email protected]>
|
|
This patch fixes a race between snd_card_file_remove() and
snd_card_disconnect(). When the card is added to shutdown_files list
in snd_card_disconnect(), but it's freed in snd_card_file_remove() at
the same time, the shutdown_files list gets corrupted. The list member
must be freed in snd_card_file_remove() as well.
Reported-and-tested-by: Russ Dill <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
|
The jz4740 nand driver now requires that the ecc offsets are set.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2058/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Register the gpio-charger device which reports whether device is currently
charging or not.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2059/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Ralf Baechle <[email protected]>
|
|
These system calls we recently added.
32-bit ABIs need compat handling for sys_clock_adjtime().
o32 also needs compat handling for sys_open_by_handle_at();
Signed-off-by: David Daney <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2165/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
And cleanup direct access to irq_desc[].
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2208/
Patchwork: https://patchwork.linux-mips.org/patch/2209/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2207/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2206/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2205/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2204/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2203/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2202/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2201/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2200/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2199/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2198/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2197/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2196/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2195/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2194/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2193/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2192/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2191/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2190/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2189/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2188/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2187/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2186/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2185/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2184/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
The conversion did not make use of the new chip flag which signals the
core code to mask the chip before calling the set_type callback. Sigh.
Use the new lockdep helper as well.
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2183/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Currently there is one irq_chip per gpio_chip with the only difference
being the name. Since the information whether the irq belong to GPIO
bank A, B, C or D is not that important rewrite the code to simply use
a single irq_chip for all gpio_chips.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2182/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Convert the JZ4740 intc and gpio irq chips to use newstyle irq functions.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2181/
Signed-off-by: Ralf Baechle <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/2180/
Signed-off-by: Ralf Baechle <[email protected]>
|