[PATCH] ext4: return ENOMEM if sb_getblk() fails

2013-01-12 Thread Theodore Ts'o
The only reason for sb_getblk() failing is if it can't allocate the buffer_head. So ENOMEM is more appropriate than EIO. In addition, make sure that the file system is marked as being inconsistent if sb_getblk() fails. Signed-off-by: "Theodore Ts'o" Cc: stable@vger.ker

Re: [ 36/71] ext4: lock i_mutex when truncating orphan inodes

2013-01-17 Thread Theodore Ts'o
On Fri, Jan 18, 2013 at 01:47:48AM -0200, Herton Ronaldo Krzesinski wrote: > > > By the description and looking at commit c278531d39, this change isn't > > > needed for 3.0 or 3.4 kernels (anything <= 3.6), they don't contain > > > commit c278531d39. > > > > Ah, good catch. Should this be reverte

[PATCH 2/2] quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format

2013-01-20 Thread Theodore Ts&#x27;o
Otherwise, ext4 file systems with the quota feature enable will get a very confusing "No such process" error message if the quota code is built as a mdoule and the quota_v2 module has not been loaded. Signed-off-by: "Theodore Ts'o" Cc: Jan Kara Cc: stable@vger.kern

[PATCH 1/2] ext4: release sysfs kobject when failing to enable quotas on mount

2013-01-20 Thread Theodore Ts&#x27;o
In addition, print the error returned from ext4_enable_quotas() Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/super.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 30651bd..0a6e9d5

Re: [PATCH 2/2] quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format

2013-01-21 Thread Theodore Ts&#x27;o
On Mon, Jan 21, 2013 at 11:40:17AM +0100, Jan Kara wrote: > On Mon 21-01-13 01:46:21, Ted Tso wrote: > > Otherwise, ext4 file systems with the quota feature enable will get a > > very confusing "No such process" error message if the quota code is > > built as a mdoule and the quota_v2 module has no

Re: [PATCH 2/2] quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format

2013-01-21 Thread Theodore Ts&#x27;o
On Mon, Jan 21, 2013 at 04:10:08PM +0100, Jan Kara wrote: > Exactly. There shouldn't be any conflicts so just keep it in your tree. > You can add to the patch: > Acked-by: Jan Kara Great, thanks. BTW, do you have any plans to work on getting repquota support for ocfs2 and ext4 with the interna

Re: [PATCH 1/4] ext4: Fix possible use-after-free with AIO

2013-01-29 Thread Theodore Ts&#x27;o
e last thing we do with the inode. > > CC: linux-e...@vger.kernel.org > CC: "Theodore Ts'o" > CC: stable@vger.kernel.org > Reviewed-by: Carlos Maiolino > Acked-by: Jeff Moyer > Signed-off-by: Jan Kara I've picked up t

[PATCH] ext4: fix data=journal fast mount/umount hang

2013-03-20 Thread Theodore Ts&#x27;o
super+0x22/0x49 [] deactivate_super+0x30/0x33 [] mntput_no_expire+0x107/0x10c [] sys_umount+0x2cf/0x2e0 [] sys_oldumount+0x12/0x14 [] syscall_call+0x7/0xb ---[ end trace 6a954cc790501c1f ]--- jbd2_log_wait_commit: error: j_commit_request=-1289337090, tid=0 Signed-off-by: "Theodore Ts'o&q

Re: [PATCH] ext4: fix data=journal fast mount/umount hang

2013-03-20 Thread Theodore Ts&#x27;o
- Ted >From ed4fe107ccba4424a9a074b060172eb390691ffa Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 20 Mar 2013 09:42:11 -0400 Subject: [PATCH] ext4: fix data=journal fast mount/umount hang In data=journal mode, if we unmount the file system before a transaction has a chance to complete, when the j

Re: [PATCH] fix ext4 mismerge back in January

2012-07-22 Thread Theodore Ts&#x27;o
On Wed, Jul 18, 2012 at 09:31:36AM +0100, Al Viro wrote: > Duplicate caused, AFAICS, by mismerge in > ff9cb1c4eead5e4c292e75cd3170a82d66944101> > Cc: stable@vger.kernel.org > Signed-off-by: Al Viro Applied, thanks. - Ted -- To unsubscribe from this list:

Re: [PATCH] random: mix in architectural randomness in extract_buf()

2012-07-27 Thread Theodore Ts&#x27;o
ion. ] Signed-off-by: H. Peter Anvin Acked-by: Ingo Molnar Cc: DJ Johnston Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/2] ext4: use proper csum calculation in ext4_rename

2012-07-31 Thread Theodore Ts&#x27;o
er a htree root or a normal directory block and we have different csum calculation for these 2 types, we have to choose the right one in ext4_rename. btw, it is found by xfstests 013. Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" Acked-by: Darrick J. Wong --- [ Sorry, I

[PATCH 2/2] ext4: use s_csum_seed instead of i_csum_seed for xattr block

2012-07-31 Thread Theodore Ts&#x27;o
e2fsprogs will be sent in another patch. This is spotted by xfstests 117. Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" Acked-by: Darrick J. Wong --- [ Sorry, I forgot to tag these with stable@vger.kernel.org -- Ted ] fs/ext4/xattr.c | 11 --- 1 file changed, 4 i

Re: [PATCH 2/2] ext4: use s_csum_seed instead of i_csum_seed for xattr block

2012-08-06 Thread Theodore Ts&#x27;o
f1fc49860a50179 even though I forgot to mark them with a cc:stable@vger.kernel.org. Many thanks!! - Ted On Tue, Jul 31, 2012 at 01:27:04PM -0400, Theodore Ts'o wrote: > From: Tao Ma > > commit 41eb70dde42b2360074a559a6f1fc49860a

[PATCH] ext4: fix kernel BUG on large-scale rm -rf commands

2012-08-17 Thread Theodore Ts&#x27;o
by: Maciej Żenczykowski Reported-by: Marti Raudsepp Tested-by: Fengguang Wu Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/extents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index cd0c7ed..aabbb3f 100644 --- a/f

Re: ext4 hung tasks in linux-stable 3.0.41

2012-08-31 Thread Theodore Ts&#x27;o
On Fri, Aug 31, 2012 at 11:28:59AM +0200, Jan Kara wrote: > > > > Is this problem known? Or is there a fix for 3.0.X available? > From a quick look, processes are waiting for IO so it may be that your > disk is just loaded... Did it start happening after some change? Or do you > experience unexp

Re: [PATCH] ext4: fixup 64-bit divides in linux-3.0 stable backport of upstream fix

2013-04-05 Thread Theodore Ts&#x27;o
On Fri, Apr 05, 2013 at 04:18:15PM -0700, Todd Poynor wrote: > Perhaps the better fix is to revert those additional changes and let > the ext4 folks figure out what to do about the remaining atomic_reads. > > > And care to cc: the ext4 developers/maintainers when sending ext4 > > patches? Can you

Re: [PATCH] ext4: fixup 64-bit divides in linux-3.0 stable backport of upstream fix

2013-04-05 Thread Theodore Ts&#x27;o
hence the test matrix. Signed-off-by: Lukas Czerner Signed-off-by: "Theodore Ts'o" So the 64-bit divides aren't in the upstream kernel because the code in question is long gone in the mainline ext4 code. It looks like Cai (who did the 3.0 backport) never tes

[PATCH 1/3] ext4: fix big-endian bug in extent migration code

2013-04-09 Thread Theodore Ts&#x27;o
From: Dmitry Monakhov Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index c1c0094..fa85ce8 100644 --- a/fs

[PATCH 2/3] ext4: fix big-endian bug in metadata checksum calculations

2013-04-09 Thread Theodore Ts&#x27;o
From: Dmitry Monakhov Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/inode.c | 8 fs/ext4/mmp.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 6

[PATCH] ext4: fix Kconfig documentation for CONFIG_EXT4_DEBUG

2013-04-21 Thread Theodore Ts&#x27;o
Fox the Kconfig documentation for CONFIG_EXT4_DEBUG to match the change made by commit a0b30c1229: ext4: use module parameters instead of debugfs for mballoc_debug Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/Kconfig | 3 ++- 1 file changed, 2 insertions

[PATCH] ext4: add check for inodes_count overflow in new resize ioctl

2013-04-21 Thread Theodore Ts&#x27;o
Addresses-Red-Hat-Bugzilla: #913245 Reported-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 08d2312..b27c96d 100644 --- a/fs/ext4/re

Re: + random-fix-accounting-race-condition-with-lockless-irq-entropy_count-update.patch added to -mm tree

2013-05-01 Thread Theodore Ts&#x27;o
On Wed, May 01, 2013 at 02:55:11PM +0200, Jiri Kosina wrote: > > > > -- > > From: Jiri Kosina > > Subject: random: fix accounting race condition with lockless irq > > entropy_count update > > I see this hasn't been included even in the third (

Re: [PATCH 3.8, 3.9-stable] ext4: add check for inodes_count overflow in new resize ioctl

2013-05-06 Thread Theodore Ts&#x27;o
On Mon, May 06, 2013 at 04:22:47PM +0800, Lingzhu Xiang wrote: > commit 3f8a6411fbada1fa482276591e037f3b1adcf55b upstream. > > Backported for 3.8 and 3.9-stable. Reverted ext4_get_group_number in bd86298. > > From: Theodore Ts'o > > Addresses-Red-Hat-Bugzilla: #913

Re: [PATCH 3.8, 3.9-stable] ext4: add check for inodes_count overflow in new resize ioctl

2013-05-06 Thread Theodore Ts&#x27;o
On Mon, May 06, 2013 at 06:38:25PM +0800, Lingzhu Xiang wrote: > Yes, this patch failed to apply automatically for 3.9 and would fail > for 3.8 and 3.4. Ah, I didn't realize. Thanks for backporting it! - Ted -- To unsubscribe from this list: send the

Re: [PATCH RFC] random: Account for entropy loss due to overwrites

2012-10-15 Thread Theodore Ts&#x27;o
On Sat, Sep 29, 2012 at 12:47:04PM -0700, H. Peter Anvin wrote: > >-static struct poolinfo { > >+static const struct poolinfo { > >+int poolshift; /* log2(POOLBITS) */ > > int poolwords; > > int tap1, tap2, tap3, tap4, tap5; Poolshift is duplicated information; it's just log2(

Re: [PATCH RFC] random: Account for entropy loss due to overwrites

2012-10-16 Thread Theodore Ts&#x27;o
On Mon, Oct 15, 2012 at 09:45:23PM -0700, H. Peter Anvin wrote: > > Or we could compute poolwords (and poolbits, and poolbytes) from it, > since shifts generally are cheap. I don't strongly care, whatever your > preference is. We are already calculating poolbits from poolwords: #define POOLBITS

Re: Apparent serious progressive ext4 data corruption bug in 3.6.3 (and other stable branches?)

2012-10-23 Thread Theodore Ts&#x27;o
s ASAP. - Ted commit 26de1ba5acc39f0ab57ce1ed523cb128e4ad73a4 Author: Theodore Ts'o Date: Tue Oct 23 18:15:22 2012 -0400 jbd2: fix a potential fs corrupting bug in jbd2_mark_journal_empty Fix a potential file system corrupting bug which was introduce

Re: Apparent serious progressive ext4 data corruption bug in 3.6.3 (and other stable branches?)

2012-10-23 Thread Theodore Ts&#x27;o
Just to follow up (mostly for ext4 developers). After talking to Eric via irc, it appears he thought it was sufficient to check (s_start == 0) from commit 24bcc89c7e, which was authored by Jan Kara. (Which we now need to audit very carefully, although it's been in the upstream kernel since 3.4, s

Re: Apparent serious progressive ext4 data corruption bug in 3.6.3 (and other stable branches?)

2012-10-23 Thread Theodore Ts&#x27;o
On Wed, Oct 24, 2012 at 12:06:21AM +0100, Nix wrote: > I note that the patch is in the latest stable releases of 3.4.x and > 3.5.x, which are IIRC end-of-lifed. I'd say that if your patch does > indeed fix it, this justifies pushing out new releases of both these > stable kernels with just this pat

Re: Apparent serious progressive ext4 data corruption bug in 3.6.3 (and other stable branches?)

2012-10-24 Thread Theodore Ts&#x27;o
On Wed, Oct 24, 2012 at 09:13:01PM +0200, Jannis Achstetter wrote: > > As a "normal linux user" I'm interested in the practical things to do > now to avoid data loss. I'm running several systems with 3.6.2 and ext4. > Fearing loss of data: > - Is there a way to see whether the journal of a specifi

[PATCH 1/2] ext4: revert "jbd2: don't write superblock when if its empty"

2012-10-25 Thread Theodore Ts&#x27;o
the unexpected disconnection of external disks. So let's back out this change while do more investigation... Signed-off-by: "Theodore Ts'o" Reported-by: Nix Reported-by: Toralf Förster Cc: stable@vger.kernel.org --- fs/jbd2/journal.c | 5 - 1 file changed, 5 deletions

[PATCH 1/2] ext4: revert "jbd2: don't write superblock when if its empty"

2012-10-25 Thread Theodore Ts&#x27;o
the unexpected disconnection of external disks. So let's back out this change while do more investigation... Signed-off-by: "Theodore Ts'o" Reported-by: Nix Reported-by: Toralf Förster Cc: stable@vger.kernel.org --- fs/jbd2/journal.c | 5 - 1 file changed, 5 deletions

Re: Apparent serious progressive ext4 data corruption bug in 3.6.3 (and other stable branches?)

2012-10-26 Thread Theodore Ts&#x27;o
This looks very different. The symptoms are quite different, and it's most likely that an unclean shutdown is involved. In your case, you're doing clean shutdowns, with some suspend/resume cycles thrown in. Also, kernel version 3.5.5 doesn't have the commits that were added between 3.6.1 and 3.6

Re: ext4 issue after unclean shutdown and reboot

2012-10-26 Thread Theodore Ts&#x27;o
I've bcc'ed stable@vger.kernel.org, LKML, and greg-kh, since I suspect they aren't interested in all of these details... we'll keep this on linux-ext4 for sanity's sake. On Sat, Oct 27, 2012 at 01:15:42AM +0200, Martin wrote: > > sorry for the repetition, but Th

Re: [PATCH] ext4: fix metadata checksum calculation for the superblock

2012-11-12 Thread Theodore Ts&#x27;o
tely FUBAR'ed and was calculating the checksum on the wrong data > (for all but 1k block file systems, sigh). > > We just didn't notice because the checksum would be correctly set when > the file system was unmounted cleanly. (Sigh). > > The following patch should

[PATCH 07/12] random: use the arch-specific rng in xfer_secondary_pool

2012-07-06 Thread Theodore Ts&#x27;o
we're much better off using it in xfer_secondary_pool() anyway. Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- drivers/char/random.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/char/random.c b/drivers

[PATCH 04/12] random: create add_device_randomness() interface

2012-07-06 Thread Theodore Ts&#x27;o
time needed to detect/configure the hardware in question. ] Signed-off-by: Linus Torvalds Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- drivers/char/random.c | 28 include/linux/random.h | 1 + 2 files changed, 29 insertions(+

[PATCH 05/12] usb: feed USB device information to the /dev/random driver

2012-07-06 Thread Theodore Ts&#x27;o
Send the USB device's serial, product, and manufacturer strings to the /dev/random driver to help seed its pools. Cc: Linus Torvalds Acked-by: Greg KH Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- drivers/usb/core/hub.c | 9 + 1 file changed, 9

[PATCH 11/12] rtc: wm831x: Feed the write counter into device_add_randomness()

2012-07-06 Thread Theodore Ts&#x27;o
he goal is to seed the pool rather than add useful entropy. Signed-off-by: Mark Brown Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- drivers/rtc/rtc-wm831x.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-wm831x.c b/

[PATCH 06/12] net: feed /dev/random with the MAC address when registering a device

2012-07-06 Thread Theodore Ts&#x27;o
Cc: David Miller Cc: Linus Torvalds Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- net/core/dev.c | 3 +++ net/core/rtnetlink.c | 1 + 2 files changed, 4 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 6df2140..bdd1e88 100644 --- a/net/c

[PATCH 03/12] random: use lockless techniques in the interrupt path

2012-07-06 Thread Theodore Ts&#x27;o
The real-time Linux folks don't like add_interrupt_randomness() taking a spinlock since it is called in the low-level interrupt routine. This also allows us to reduce the overhead in the fast path, for the random driver, which is the interrupt collection path. Signed-off-by: "Theodore

[PATCH 08/12] random: add new get_random_bytes_arch() function

2012-07-06 Thread Theodore Ts&#x27;o
a HW RNG anyway. For those places that really want access to the arch-specific HW RNG, if it is available, we provide get_random_bytes_arch(). Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- drivers/char/random.c | 29 - include/linux/ran

[PATCH 12/12] mfd: wm831x: Feed the device UUID into device_add_randomness()

2012-07-06 Thread Theodore Ts&#x27;o
From: Mark Brown wm831x devices contain a unique ID value. Feed this into the newly added device_add_randomness() to add some per device seed data to the pool. Signed-off-by: Mark Brown Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- drivers/mfd/wm831x-otp.c | 8 1

[PATCH 02/12] random: make 'add_interrupt_randomness()' do something sane

2012-07-06 Thread Theodore Ts&#x27;o
y: J. Alex Halderman . Signed-off-by: Linus Torvalds Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- drivers/char/random.c | 103 ++ drivers/mfd/ab3100-core.c | 2 - include/linux/random.h| 2 +- kernel/irq/handle.c

Re: [PATCH 05/12] usb: feed USB device information to the /dev/random driver

2012-07-06 Thread Theodore Ts&#x27;o
On Fri, Jul 06, 2012 at 06:02:18PM -0500, Jonathan Nieder wrote: > > Why cc: stable@? Does this fix a build error, oops, hang, data > corruption, real security issue, or other critical "oh, that's not > good" bug? All of the /dev/random patches in this patch series that were marked for the stabl

Re: [PATCH] random: only use gathered bytes from arch_get_random_long

2012-07-07 Thread Theodore Ts&#x27;o
On Sat, Jul 07, 2012 at 10:11:22AM -0700, Kees Cook wrote: > While very unlikely, it is possible for arch_get_random_long() to fail > in the middle of the loop in xfer_secondary_pool(), which would mean > that the loop could stop with only part of u.hwrand populated, leading > to mix_pool_bytes() i

Re: [PATCH 07/12] random: use the arch-specific rng in xfer_secondary_pool

2012-07-07 Thread Theodore Ts&#x27;o
On Sun, Jul 08, 2012 at 02:06:46AM +0100, Ben Hutchings wrote: > > Surely the number of random bytes being added is i * sizeof(long), not > sizeof(u.hwrand)? > Meh; Kees Cook has made the same observation. Basically, in the unlikely case where RDRAND fails, we'll end up mixing in stack garbage.

[PATCH 2/5] ext4: avoid duplicate writes of the backup bg descriptor blocks

2012-09-01 Thread Theodore Ts&#x27;o
From: Yongqiang Yang The resize code was needlessly writing the backup block group descriptor blocks multiple times (once per block group) during an online resize. Signed-off-by: Yongqiang Yang Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 1

[PATCH 1/5] ext4: when resizing, do not copy gdt blocks for groups that do not have them

2012-09-02 Thread Theodore Ts&#x27;o
waste of perfectly good I/O bandwidth, to skip writing those blocks for sparse bg's. Signed-off-by: Yongqiang Yang Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/ext4/resize.c b/fs

[PATCH 2/9] ext4: avoid duplicate writes of the backup bg descriptor blocks

2012-09-13 Thread Theodore Ts&#x27;o
From: Yongqiang Yang The resize code was needlessly writing the backup block group descriptor blocks multiple times (once per block group) during an online resize. Signed-off-by: Yongqiang Yang Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 1

[PATCH 1/9] ext4: don't copy non-existent gdt blocks when resizing

2012-09-13 Thread Theodore Ts&#x27;o
waste of perfectly good I/O bandwidth, to skip writing those blocks for sparse bg's. Signed-off-by: Yongqiang Yang Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/ext4/resize.c b/fs

[PATCH] ext4: fix potential deadlock in ext4_nonda_switch()

2012-09-19 Thread Theodore Ts&#x27;o
/0x44 [] vfs_write+0x7b/0xe6 [] sys_write+0x3b/0x64 [] syscall_call+0x7/0xb Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/inode.c | 4 ++-- fs/fs-writeback.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c

Online resizing ext4 file systems > 16TB?

2012-09-21 Thread Theodore Ts&#x27;o
Hi, I have a set of patches that are currently queued for merging for 3.6. I didn't mark them for stable@vger.kernel.org, since they aren't a bug fix, but rather a new feature. However, it occurs to me that this is a feature that many enterprise/stable users would probably want. The patches are

Re: [PATCH] ext4: fix potential deadlock in ext4_nonda_switch()

2012-09-21 Thread Theodore Ts&#x27;o
On Fri, Sep 21, 2012 at 05:12:05PM -0500, Eric Sandeen wrote: > > - if (free_blocks < 2 * dirty_blocks) > > - writeback_inodes_sb_if_idle(sb, WB_REASON_FS_FREE_SPACE); > > + if ((free_blocks < 2 * dirty_blocks) && > > writeback_in_progress(sb->s_bdi)) > > + writeback_inodes

Re: Online resizing ext4 file systems > 16TB?

2012-09-21 Thread Theodore Ts&#x27;o
On Fri, Sep 21, 2012 at 04:02:09PM -0700, Greg Kroah-Hartman wrote: > > That sounds "nice", but it seems to be a feature, and doesn't meet the > main requirements of the stable tree. I thought you had said that some features had gone into the stable kernel tree because distro's were shipping them

Re: Online resizing ext4 file systems > 16TB?

2012-09-22 Thread Theodore Ts&#x27;o
On Fri, Sep 21, 2012 at 07:53:22PM -0700, Greg Kroah-Hartman wrote: > On Fri, Sep 21, 2012 at 08:49:30PM -0400, Theodore Ts'o wrote: > > On Fri, Sep 21, 2012 at 04:02:09PM -0700, Greg Kroah-Hartman wrote: > > > > > > That sounds "nice", but it s

Re: [PATCH] ext4: fix potential deadlock in ext4_nonda_switch()

2012-09-27 Thread Theodore Ts&#x27;o
On Thu, Sep 27, 2012 at 09:18:30PM +0400, Dmitry Monakhov wrote: > Hmm... even this '!' patch is still not good. I've got that complain > WARNING: at fs/fs-writeback.c:1316 writeback_inodes_sb_nr+0x1a3/0x200() This WARN_ON checking to make sure the s_umount mutex is grabbed. What kernel are you a

Re: [PATCH] ext4: fix potential deadlock in ext4_nonda_switch()

2012-09-27 Thread Theodore Ts&#x27;o
Ah, you're right. I *can* easily see the problem; somehow I just didn't notice it, but when I look back at my test logs, it's definitely there. I thought sb_start_write() took s_umount, but it doesn't, because it was trying to solve the exact same lock ordering problem. Drat Unfortunately,

[PATCH v2] ext4: fix potential deadlock in ext4_nonda_switch()

2012-09-27 Thread Theodore Ts&#x27;o
:00 2001 From: Theodore Ts'o Date: Thu, 27 Sep 2012 23:12:48 -0400 Subject: [PATCH v2] ext4: fix potential deadlock in ext4_nonda_switch() In ext4_nonda_switch(), if the file system is getting full we used to call writeback_inodes_sb_if_idle(). The problem is that we can be holding i_mutex

[PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode

2012-09-30 Thread Theodore Ts&#x27;o
write(), ext4_page_mkwrite, and nilfs_page_mkwrite(), the best way to solve this is to move the responsibility for calling file_update_time() to its caller. Signed-off-by: "Theodore Ts'o" Cc: Jan Kara Cc: KONISHI Ryusuke Cc: stable@vger.kernel.org --- NOTE: Since this is a 3.6 regression, I ma

Re: [PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode

2012-09-30 Thread Theodore Ts&#x27;o
Note: this fixes a failure in xfstests #215 for ext3 file systems mounted using ext4 and ext4 file systems mounted with -o nodelalloc. - Ted On Sun, Sep 30, 2012 at 03:48:19PM -0400, Theodore Ts'o wrote: > Commits 41c4d25f78c0 and 41c4d25f78c0 in

Re: [PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode

2012-09-30 Thread Theodore Ts&#x27;o
On Sun, Sep 30, 2012 at 12:50:02PM -0700, Jonathan Nieder wrote: > Theodore Ts'o wrote: > > > Since __block_page_mkwrite() only has three years, > > block_page_mkwrite(), ext4_page_mkwrite, and nilfs_page_mkwrite(), the > > years = callers? Yes, thanks for poi

Re: [PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode

2012-09-30 Thread Theodore Ts&#x27;o
o its caller. This problem was found via xfstests #215 with a file system mounted with -o nodelalloc. Signed-off-by: "Theodore Ts'o" Cc: Jan Kara Cc: KONISHI Ryusuke Cc: stable@vger.kernel.org Note: If this gets pushed to Linus before the merge window opens, I'll drop the cc

Re: [PATCH] ext4: fix metadata checksum calculation for the superblock

2012-11-22 Thread Theodore Ts&#x27;o
On Wed, Nov 21, 2012 at 12:25:09PM -0800, Greg KH wrote: > > Ah, sorry, I had missed that. I've fixed that up in the patch and > applied it now, thanks for telling me what I did wrong. Thanks for fixing up the patch. It saved me the trouble of resubmitting a fixed up patch; much appreciated!!

Re: [PATCH] ext4: Fix possible use after free of buffer head

2012-11-29 Thread Theodore Ts&#x27;o
On Thu, Nov 29, 2012 at 11:02:39AM -0800, Darrick J. Wong wrote: > On Thu, Nov 29, 2012 at 11:43:48AM +0100, Lukas Czerner wrote: > > Commit fa77dcfafeaa6bc73293c646bfc3d5192dcf0be2 introduces block bitmap > > checksum calculation into ext4_new_inode() in the case that block group > > was uninitial

Re: [PATCH] jbd2: Fix assertion failure in jbd2_journal_flush()

2012-12-20 Thread Theodore Ts&#x27;o
On Wed, Dec 12, 2012 at 04:17:42PM +0100, Jan Kara wrote: > The following race is possible between start_this_handle() and someone > calling jbd2_journal_flush(). > > Process A Process B > start_this_handle(). > if (journal->j_barrier_count) # false > if (!journal-

[PATCH 2/2] ext4: avoid hang when mounting non-journal filesystems with orphan list

2012-12-26 Thread Theodore Ts&#x27;o
denial of service attack. (Not a big deal in practice, but professional paranoids worry about such things, and have even been known to allocate CVE numbers on occasion.) Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/namei.c | 3 ++- 1 file changed, 2 i

[PATCH 1/2] ext4: lock i_mutex when truncating orphan inodes

2012-12-26 Thread Theodore Ts&#x27;o
ON in this case. Take the i_mutex in ext4_orphan_cleanup() to suppress this warning. Reported-by: Alexander Beregalov Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/s

Re: Cleanup of Kernel Bugzilla

2014-06-28 Thread Theodore Ts&#x27;o
On Fri, Jun 27, 2014 at 10:45:47PM -0400, Nick Krause wrote: > Do any of you use the kernel Bugzilla? If you do I was wondering if we > can clean it up. > Otherwise I was wondering were I can get an accurate list of open > bugs in the newest > kernels. Some subsystem maintainers use the kernel bu

Re: Cleanup of Kernel Bugzilla

2014-06-28 Thread Theodore Ts&#x27;o
On Sat, Jun 28, 2014 at 12:06:15PM -0400, Nick Krause wrote: > Do all of you guys even care about cleaning up bugs? If > you do it would be great if I get a reply to where I can get > a up to date list of kernel bugs. We care about fixing bugs. Most kernel devs don't really care about maintaining

[PATCH] ext4: fix unjournalled bg descriptor while initializing inode bitmap

2014-07-05 Thread Theodore Ts&#x27;o
. Otherwise, there is the potential of a bad journal checksum (if journal checksums are enabled), and of the file system becoming inconsistent if we crash at exactly the wrong time. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/ext4/ialloc.c | 14 +++--- 1 file chang

Re: [PATCH] ext4: fix wrong assert in ext4_mb_normalize_request()

2014-07-05 Thread Theodore Ts&#x27;o
from the size of a block. > > Cc: stable@vger.kernel.org > Signed-off-by: Maurizio Lombardi > Signed-off-by: Theodore Ts'o This is already in Linus's tree (commit b5b607785). I'm not sure why you resent it? - Ted -- To unsubscri

[PATCH] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error()

2014-07-05 Thread Theodore Ts&#x27;o
We are spending a lot of time explaining to users what this error means. Let's try to improve the message to avoid this problem. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/ext4/mballoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] ext4: clarify ext4_error message in ext4_mb_generate_buddy_error()

2014-07-08 Thread Theodore Ts&#x27;o
On Tue, Jul 08, 2014 at 09:03:48AM +0200, Lukáš Czerner wrote: > > It is a bit better, even though strictly speaking it's not > right, because it is not block bitmap alone, but rather aggregation > of block bitmap and preallocations. But for the user this is really > an implementation detail they

[PATCH] ext4: fix a potential deadlock in __ext4_es_shrink()

2014-07-12 Thread Theodore Ts&#x27;o
39/0x50 [] ? __ext4_es_shrink+0x4f/0x2e0 [] ? kmem_cache_alloc+0x18b/0x1a0 [] __ext4_es_shrink+0x4f/0x2e0 [] ext4_es_insert_extent+0xc8/0x180 [] ext4_map_blocks+0x1c4/0x550 [] ext4_writepages+0x6d4/0xd00 ... Reported-by: Minchan Kim Signed-off-by: Theodore Ts'o Reported-by: Minchan Ki

[PATCH 1/6] ext4: propagate errors up to ext4_find_entry()'s callers

2014-08-22 Thread Theodore Ts&#x27;o
-Google-Bug: #17142205 Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/ext4/namei.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index b147a67..ae7088b 100644 --- a/fs/ext4/namei.c +++

[PATCH] ext4: fix BUG_ON in mb_free_blocks()

2014-08-22 Thread Theodore Ts&#x27;o
mb_unload_buddy() call in ext4_discard_allocated_blocks(). Google-Bug-Id: 16844242 Fixes: 86f0afd463215fc3e58020493482faa4ac3a4d69 Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/ext4/mballoc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 9560277

[PATCH-v2 1/2] fs: make sure the timestamps for lazytime inodes eventually get written

2015-03-16 Thread Theodore Ts&#x27;o
ork structure which wakes up the CPU much more rarely compared to writeback_expire_centisecs. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/fs-writeback.c | 82 +++--- include/linux/fs.h | 1 + 2 files changed, 73 insertion

[PATCH-v2 2/2] fs: add dirtytime_expire_seconds sysctl

2015-03-16 Thread Theodore Ts&#x27;o
Add a tuning knob so we can adjust the dirtytime expiration timeout, which is very useful for testing lazytime. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/fs-writeback.c | 11 +++ include/linux/writeback.h | 3 +++ kernel/sysctl.c | 8 ++

Re: [PATCH-v2 1/2] fs: make sure the timestamps for lazytime inodes eventually get written

2015-03-17 Thread Theodore Ts&#x27;o
On Mon, Mar 16, 2015 at 03:34:12PM -0600, Andreas Dilger wrote: > I wonder if something more lightweight could be added to avoid this > problem? For example, we only care about this case if it has been > going on for more than the lazytime interval (about a day), so the > inode could store a 16-bi

Re: [PATCH-v2 1/2] fs: make sure the timestamps for lazytime inodes eventually get written

2015-03-17 Thread Theodore Ts&#x27;o
On Tue, Mar 17, 2015 at 11:33:37AM +0100, Jan Kara wrote: > Yes, something like this should be possible. But I wanted that to happen > as a separate patch once we have everything working correctly. The code is > subtle enough that I didn't want Ted to complicate it with further > optimizations in

Re: Patch "ext4: atomically set inode->i_flags in ext4_set_inode_flags()" has been added to the 3.10-stable tree

2014-03-31 Thread Theodore Ts&#x27;o
out it. > > > From 00a1a053ebe5febcfc2ec498bd894f035ad2aa06 Mon Sep 17 00:00:00 2001 > From: Theodore Ts'o > Date: Sun, 30 Mar 2014 10:20:01 -0400 > Subject: ext4: atomically set inode->i_flags in ext4_set_inode_flags() > > From: Theodore Ts'o > > co

Re: Patch "ext4: atomically set inode->i_flags in ext4_set_inode_flags()" has been added to the 3.10-stable tree

2014-03-31 Thread Theodore Ts&#x27;o
On Mon, Mar 31, 2014 at 04:44:58PM -0700, Greg KH wrote: > > OTOH, this is a security fix, and the bug has been reported and > > outstanding for a while, so if you want to push this sooner, that's > > fine. > > Yes, I'd prefer to take this as-is, and I'll take any "cleanups" later > when they hit

[PATCH -v2] ext4: move ext4_update_i_disksize() into mpage_map_and_submit_extent()

2014-04-12 Thread Theodore Ts&#x27;o
re we update i_disksize. That way, we also keep the raw_inode's i_disksize protected. Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- Oops, the first version was missing the commit description fs/ext4/ext4.h | 17 - fs/ext4/inode.c | 16

[PATCH] ext4: use i_size_read in ext4_unaligned_aio()

2014-04-12 Thread Theodore Ts&#x27;o
We haven't taken i_mutex yet, so we need to use i_size_read(). Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 6db7f7d..bc76559 100644

Re: [PATCH -v2] ext4: move ext4_update_i_disksize() into mpage_map_and_submit_extent()

2014-04-15 Thread Theodore Ts&#x27;o
also move the call to ext4_mark_inode_dirty() into > > the i_data_sem's critical region, to be consistent with all of the > > other places where we update i_disksize. That way, we also keep the > > raw_inode's i_disksize protected. > > > > Signed-off-by: "

Re: [PATCH] tty: Prevent untrappable signals from malicious program

2015-01-19 Thread Theodore Ts&#x27;o
On Mon, Jan 19, 2015 at 01:00:03PM -0500, Peter Hurley wrote: > >> --- a/drivers/tty/pty.c > >> +++ b/drivers/tty/pty.c > >> @@ -210,6 +210,9 @@ static int pty_signal(struct tty_struct *tty, int sig) > >> { > >> struct pid *pgrp; > >> > >> +if (sig != SIGINT || sig != SIGQUIT || sig !=

[PATCH, RFC 01/12] random: run random_int_secret_init() run after all late_initcalls

2013-09-22 Thread Theodore Ts&#x27;o
The some platforms (e.g., ARM) initializes their clocks as late_initcalls for some unknown reason. So make sure random_int_secret_init() is run all of the late_initcalls are run. Cc: stable@vger.kernel.org Signed-off-by: "Theodore Ts'o" --- drivers/char/random.c | 3 +--

[PATCH, RFC 02/12] random: Statically compute poolbitshift, poolbytes, poolbits

2013-09-22 Thread Theodore Ts&#x27;o
rate worse code since the C compiler doesn't know the fixed relationship between these fields, but that is somewhat unlikely. Signed-off-by: H. Peter Anvin Cc: Signed-off-by: Theodore Ts'o --- drivers/char/random.c | 39 +++ 1 file changed,

[PATCH, RFC 04/12] random: Account for entropy loss due to overwrites

2013-09-22 Thread Theodore Ts&#x27;o
ut that multiply then would have to be turned into a 32*32 -> 64 multiply. Signed-off-by: H. Peter Anvin Cc: DJ Johnston Cc: Signed-off-by: Theodore Ts'o --- drivers/char/random.c | 60 --- 1 file changed, 52 insertions(+), 8 deletions(-) d

[PATCH, RFC 03/12] random: Allow fractional bits to be tracked

2013-09-22 Thread Theodore Ts&#x27;o
From: "H. Peter Anvin" Allow fractional bits of entropy to be tracked by scaling the entropy counter (fixed point). This will be used in a subsequent patch that accounts for entropy lost due to overwrites. Signed-off-by: H. Peter Anvin Cc: Signed-off-by: Theodore Ts'o --

Re: [PATCH, RFC 03/12] random: Allow fractional bits to be tracked

2013-09-22 Thread Theodore Ts&#x27;o
I've added the following changes to this patch since upon testing, there were some uses of r->entropy_count that were not properly converted from using fractional bits to bits. - Ted diff --git a/drivers/char/random.c b/drivers/char/random.c index 1547338..

Re: WTF: patch "[PATCH] random: allow architectures to optionally define" was seriously submitted to be applied to the 3.11-stable tree?

2013-10-14 Thread Theodore Ts&#x27;o
On Mon, Oct 14, 2013 at 01:16:41PM -0700, gre...@linuxfoundation.org wrote: > The patch below was submitted to be applied to the 3.11-stable tree. > > I fail to see how this patch meets the stable kernel rules as found at > Documentation/stable_kernel_rules.txt. This patch adds a new interface wh

Re: WTF: patch "[PATCH] random: allow architectures to optionally define" was seriously submitted to be applied to the 3.11-stable tree?

2013-10-16 Thread Theodore Ts&#x27;o
On Mon, Oct 14, 2013 at 02:15:53PM -0700, Greg KH wrote: > > This patch adds a new interface which allows architecture-specific > > code to address a security issue with the random driver for those > > platforms which define get_cycles() to return zero all the time. The > > most important p[latfor

Re: WTF: patch "[PATCH] random: allow architectures to optionally define" was seriously submitted to be applied to the 3.11-stable tree?

2013-10-16 Thread Theodore Ts&#x27;o
On Wed, Oct 16, 2013 at 07:03:19AM -0700, Greg KH wrote: > > That's fine to push it to Linus, but for stable, I can't take new > "features" without any user of those calls, that wouldn't make sense, > would it? > > How about when those MIPS changes get to Linus, you let > stable@vger.kernel.org k

[PATCH] ext4: fix online resize with very large inode tables

2014-02-15 Thread Theodore Ts&#x27;o
imate cause of the BUG_ON. 2) Incorrectly determining how many block groups contained contiguous free blocks in ext4_alloc_group_tables(). 3) Incorrectly setting the start of the next block range to be marked in use after a discontinuity in setup_new_flex_group_blocks(). Signed-off-by: &quo

[PATCH] ext4: fix online resize with a non-standard blocks per group setting

2014-02-15 Thread Theodore Ts&#x27;o
vdd /vdd resize2fs /dev/vdd 8G Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 69a6261..f3b84cd 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/

[PATCH] ext4: fix race between truncate and __ext4_journalled_writepage()

2015-06-14 Thread Theodore Ts&#x27;o
ngle_inode+0xc3/0x545 [] writeback_sb_inodes+0x21f/0x36d ... Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org --- fs/ext4/inode.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0554b0b..263a46c 100644 -

Re: [PATCH] ext4: fix race between truncate and __ext4_journalled_writepage()

2015-06-15 Thread Theodore Ts&#x27;o
On Mon, Jun 15, 2015 at 02:33:52PM +0200, Jan Kara wrote: > Yeah, that's nasty. Thanks for debugging this! However I think your fix > reintroduces the original deadlock issues. do_journal_get_write_access() > can end up blocking waiting for jbd2 thread to finish a commit while jbd2 > thread may b

  1   2   >