Re: [PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-14 Thread Yan, Zheng
On Fri, Dec 15, 2017 at 12:53 AM, Jan Kara <j...@suse.cz> wrote: > On Thu 14-12-17 22:30:26, Yan, Zheng wrote: >> On Thu, Dec 14, 2017 at 9:43 PM, Jan Kara <j...@suse.cz> wrote: >> > On Thu 14-12-17 18:55:27, Yan, Zheng wrote: >> >> We recently got an Oops

Re: [PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-14 Thread Yan, Zheng
On Thu, Dec 14, 2017 at 9:43 PM, Jan Kara <j...@suse.cz> wrote: > On Thu 14-12-17 18:55:27, Yan, Zheng wrote: >> We recently got an Oops report: >> >> BUG: unable to handle kernel NULL pointer dereference at (null) >> IP: jbd2__journal_start+

[PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-14 Thread Yan, Zheng
page) Cc: sta...@vger.kernel.org Signed-off-by: "Yan, Zheng" <z...@redhat.com> --- mm/memory.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index a728bed16c20..db2a50233c49 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4044,6 +4044

Re: [PATCH] fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at

2017-12-13 Thread Yan, Zheng
tion/filesystems/ext4.txt | 7 +++ > fs/9p/Kconfig | 3 --- > fs/Kconfig | 6 +- > fs/btrfs/Kconfig | 3 --- > fs/ceph/Kconfig | 3 — Ceph bits looks good. Acked-by: Yan, Zheng" <z...@redhat.com&

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-04 Thread Yan, Zheng
On Fri, Jun 2, 2017 at 10:18 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Fri, Jun 2, 2017 at 2:18 PM, Yan, Zheng <uker...@gmail.com> wrote: >> On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann <a...@arndb.de> wrote: >>> On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng &

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-02 Thread Yan, Zheng
On Fri, Jun 2, 2017 at 7:33 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Fri, Jun 2, 2017 at 1:18 PM, Yan, Zheng <uker...@gmail.com> wrote: >> On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann <a...@arndb.de> wrote: >>> On Fri, Jun 2, 2017 at 12:10 PM,

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-02 Thread Yan, Zheng
On Fri, Jun 2, 2017 at 6:51 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Fri, Jun 2, 2017 at 12:10 PM, Yan, Zheng <uker...@gmail.com> wrote: >> On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann <a...@arndb.de> wrote: >>> On Fri, Jun 2, 2017 at 4:09 AM,

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-02 Thread Yan, Zheng
On Fri, Jun 2, 2017 at 5:45 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Fri, Jun 2, 2017 at 4:09 AM, Yan, Zheng <uker...@gmail.com> wrote: >> On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani <deepa.ker...@gmail.com> >> wrote: >>> On Thu, Jun 1, 2017 at 5:

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-01 Thread Yan, Zheng
On Fri, Jun 2, 2017 at 8:57 AM, Deepa Dinamani <deepa.ker...@gmail.com> wrote: > On Thu, Jun 1, 2017 at 5:36 PM, John Stultz <john.stu...@linaro.org> wrote: >> On Thu, Jun 1, 2017 at 5:26 PM, Yan, Zheng <uker...@gmail.com> wrote: >>> On Thu, Jun 1, 2017 at 6

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-01 Thread Yan, Zheng
On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zheng <uker...@gmail.com> wrote: >> On Sat, Apr 8, 2017 at 8:57 AM, Deepa Dinamani <deepa.ker...@gmail.com> >> wrote: > >>> diff --git a/driver

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-01 Thread Yan, Zheng
On Thu, Jun 1, 2017 at 6:22 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jun 1, 2017 at 11:56 AM, Yan, Zheng <uker...@gmail.com> wrote: >> On Sat, Apr 8, 2017 at 8:57 AM, Deepa Dinamani <deepa.ker...@gmail.com> >> wrote: > >>> diff --git a/driver

Re: [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-06-01 Thread Yan, Zheng
->sb->s_time_gran); This change causes our kernel_untar_tar test case to fail (inode's ctime goes back). The reason is that there is time drift between the time stamps got by ktime_get_real_ts() and current_time(). We need to revert this change until current_time() uses ktime_get_real_ts() in

Re: bad unlock balance in btrfs_commit_transaction_async

2013-08-27 Thread Yan, Zheng
(), sb_start_intwrite() is called when (type __TRANS_FREEZABLE) is true. but (TRANS_ATTACH __TRANS_FREEZABLE) is false. So we see the bad bad unlock balance bug. Yan, Zheng On 08/22/2013 05:40 PM, Sage Weil wrote: I just noticed that there is a locking imbalance warning with sb_internal

Re: [BUG] kernel BUG at fs/btrfs/relocation.c:2502!

2011-09-21 Thread Yan, Zheng
On Wed, Sep 21, 2011 at 6:06 PM, Liu Bo liubo2...@cn.fujitsu.com wrote: Hi, While running my tool(attachment), I would encounter the BUG_ON, and I FAILED to find where went wrong :( The tool is with inode_cache option, and mainly do three things: a. run Chris's synctest in BACKGROUND b.

Re: [BUG] kernel BUG at fs/btrfs/relocation.c:2502!

2011-09-21 Thread Yan, Zheng
On Thu, Sep 22, 2011 at 7:42 AM, David Sterba d...@jikos.cz wrote: On Wed, Sep 21, 2011 at 06:57:56PM +0800, Yan, Zheng wrote: modification to fs trees is not allowed after create_pending_snapshots() Do you have an idea whether there is a reasonable way to catch this in code? (even if only

[PATCH] btrfs: check file extent backref offset underflow

2011-08-28 Thread Yan, Zheng
Offset field in data extent backref can underflow if clone range ioctl is used. We can reliably detect the underflow because max file size is limited to 2^63 and max data extent size is limited by block group size. Signed-off-by: Zheng Yan zheng.z@intel.com --- diff --git

Re: [RFC] Btrfs design defect in extent backref ?

2011-08-25 Thread Yan, Zheng
On Thu, Aug 25, 2011 at 3:56 PM, Li Zefan l...@cn.fujitsu.com wrote: We have an offset in file extent to indicate its position in the corresponding extent item in extent tree. We also have an offset in extent item to indicate the start position of the file extent that uses this item. The

Re: [RFC] Btrfs design defect in extent backref ?

2011-08-25 Thread Yan, Zheng
On Fri, Aug 26, 2011 at 10:00 AM, Li Zefan l...@cn.fujitsu.com wrote: Yan, Zheng wrote: On Thu, Aug 25, 2011 at 3:56 PM, Li Zefan l...@cn.fujitsu.com wrote: We have an offset in file extent to indicate its position in the corresponding extent item in extent tree. We also have an offset

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-14 Thread Yan, Zheng
I found another bug. There are codes (btrfs_save_ino_cache) that modify fs trees after create_pending_snapshots is called. This can corrupt your fs. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan l...@cn.fujitsu.com wrote: Cc: Josef I encountered following panic using 'btrfs-unstable + for-linus'

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
Add a mutex to btrfs_init_reloc_root() to prevent the reloc tree creation from concurrent execution. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan l...@cn.fujitsu.com wrote: Cc: Josef I encountered following panic using 'btrfs-unstable + for-linus' kernel. I ran btrfs fi bal /test5 command, and

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
The usage of trans_mutex in relocation code is subtle. It controls interaction of relocation with transaction start, transaction commit and snapshot creation. Simple replacing trans_mutex with trans_lock is wrong. On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan l...@cn.fujitsu.com wrote: Cc: Josef

Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

2011-06-13 Thread Yan, Zheng
On Tue, Jun 14, 2011 at 3:55 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400: The usage of trans_mutex in relocation code is subtle. It controls interaction of relocation with transaction start, transaction commit and snapshot

Re: [PATCH] Btrfs: check root_key's offset instead

2011-06-08 Thread Yan, Zheng
On Wed, Jun 8, 2011 at 5:46 PM, liubo liubo2...@cn.fujitsu.com wrote: When we use reloc root to cow or copy a tree block, we do not set the block's owner, instead we set its header's flag with BTRFS_HEADER_FLAG_RELOC. So here we should check for root_key's offset. Signed-off-by: Liu Bo

Re: btrfs-convert crashes

2011-04-27 Thread Yan, Zheng
On Wed, Apr 27, 2011 at 1:20 PM, Brian Parma freec...@cox.net wrote: I have a 1.5 TB (1,475,720,773,632) partition that I wanted to convert from ext4 to btrfs.  It is currently used as / for ubuntu 10.10. I booted into 11.04 beta2 and tried a 'btrfs-convert /dev/sdc1', but after about 20

Re: [PATCH] Btrfs: do not release delalloc space until after we end the transaction

2011-04-13 Thread Yan, Zheng
On Thu, Apr 14, 2011 at 2:54 AM, Josef Bacik jo...@redhat.com wrote: There have been many sporadic reports of the following panic [ cut here ] kernel BUG at fs/btrfs/extent-tree.c:5498! invalid opcode: [#1] PREEMPT SMP last sysfs file:

Re: [PATCH] Btrfs: fix infinite loop in btrfs_shrink_device()

2011-02-25 Thread Yan, Zheng
On Sat, Feb 26, 2011 at 7:43 AM, Ilya Dryomov idryo...@gmail.com wrote: In case of an ENOSPC error from btrfs_relocate_chunk() (line 2202) while relocating a block group with offset 0 we end up endlessly looping. This happens because key.offset -= 1 statement then unconditionally brings us

[PATCH] Btrfs: Fix balance panic

2011-01-26 Thread Yan, Zheng
Mark the cloned backref_node as checked in clone_backref_node() Signed-off-by: Yan, Zheng zheng.z@intel.com --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 045c9c2..bef9c22 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1157,6 +1157,7 @@ static int

Re: Kernel error during btrfs balance

2011-01-21 Thread Yan, Zheng
please try patch attached below, Thanks. --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index b37d723..49d6b13 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1158,6 +1158,7 @@ static int clone_backref_node(struct btrfs_trans_handle *trans,

Re: v0.19-35-g1b444cd btrfsck says snapshots have errors

2011-01-20 Thread Yan, Zheng
On Fri, Jan 21, 2011 at 6:52 AM, Ian! D. Allen idal...@idallen.ca wrote: Still getting btrfsck errors with this: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git # ./btrfstest.sh Using /mnt/sdb1 /dev/sdb1 on /dev/sdb + mkfs.btrfs -L BTRFStest /dev/sdb1 WARNING!

Re: Kernel error during btrfs balance

2011-01-18 Thread Yan, Zheng
On Tue, Jan 18, 2011 at 9:22 PM, Erik Logtenberg e...@logtenberg.eu wrote: On 01/18/2011 01:54 AM, Yan, Zheng wrote: On Mon, Jan 17, 2011 at 10:14 PM, Erik Logtenberg e...@logtenberg.eu wrote: Hi, btrfs balance results in: http://pastebin.com/v5j0809M My system: fully up-to-date Fedora 14

Re: Offline Deduplication for Btrfs

2011-01-06 Thread Yan, Zheng
appreciate any feedback you may have.  Thanks, FYI: Using clone ioctl can do the same thing (except reading data and computing hash in user space). Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

[PATCH] x86: hpet: Fix HPET timer + NMI watchdog panic

2010-12-28 Thread Yan, Zheng
HPET doesn't use timer_interrupt() as interrupt handler now. So count of HPET interrupt isn't recorded in per_cpu(irq_stat, cpu).irq0_irqs. This confuses NMI watchdog when using HPET as tick device. Signed-off-by: Yan, Zheng zheng.z@intel.com --- diff --git a/arch/x86/include/asm/hardirq.h b

Re: [PATCH] x86: hpet: Fix HPET timer + NMI watchdog panic

2010-12-28 Thread Yan, Zheng
Sent this mail to wrong list, sorry for interrupting. Yan, Zheng On Wed, Dec 29, 2010 at 9:57 AM, Yan, Zheng zheng.z@linux.intel.com wrote: HPET doesn't use timer_interrupt() as interrupt handler now. So count of HPET interrupt isn't recorded in per_cpu(irq_stat, cpu).irq0_irqs

Re: [BUG] can not allocate space for caching data

2010-12-20 Thread Yan, Zheng
+= cache-reserved_pinned;                cache-reserved_pinned = 0;                cache-ro = 1;                ret = 0;        } +        spin_unlock(cache-lock);        spin_unlock(sinfo-lock);        return ret; Looks good for me, Yan, Zheng -- To unsubscribe from this list: send

Re: [RFC PATCH 2/5 v3] Btrfs: avoid transaction stuff when btrfs is readonly

2010-12-15 Thread Yan, Zheng
On Fri, Dec 3, 2010 at 4:16 PM, liubo liubo2...@cn.fujitsu.com wrote: When the filesystem is readonly, avoid transaction stuff by checking MS_RDONLY at start transaction time. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com ---  fs/btrfs/transaction.c |    3 +++  1 files changed, 3

Re: [RFC 4/5] implement metadata_ra in btrfs

2010-12-13 Thread Yan, Zheng
into unallocated chunk. need code to check validity of the user input. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Btrfs: do not loop through raid types when looking for free extent

2010-12-13 Thread Yan, Zheng
On Tue, Dec 14, 2010 at 9:33 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Yan, Zheng's message of 2010-11-16 20:38:23 -0500: On Wed, Nov 17, 2010 at 5:22 AM, Josef Bacik jo...@redhat.com wrote: There is a bug in find_free_extent where if we don't find a free extent in the

[PATCH] Btrfs: Fix page leak in compressed writeback path

2010-12-05 Thread Yan, Zheng
start + num_bytes = actual_end can happen when compressed page writeback races with file truncation. In that case we need unlock and release pages past the end of file. Signed-off-by: Yan, Zheng zheng.z@intel.com --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8039390..2ea98d8

Re: [RFC PATCH 2/4 v2] Btrfs: avoid transaction stuff when readonly

2010-12-01 Thread Yan, Zheng
On Thu, Dec 2, 2010 at 11:42 AM, liubo liubo2...@cn.fujitsu.com wrote: On 12/01/2010 06:20 PM, liubo wrote: When the filesystem is readonly, avoid transaction stuff by checking MS_RDONLY at start transaction time. This patch may lead btrfs panic. Since btrfs allows transaction under

Re: [PATCH] Btrfs: do not loop through raid types when looking for free extent

2010-11-16 Thread Yan, Zheng
are given.  So instead kill this check and get the proper index for the raid type we want from the allocator.  Thanks, Loop through raid types is for handling failure in the middle of raid type conversion. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH] Btrfs: do not loop through raid types when looking for free extent

2010-11-16 Thread Yan, Zheng
are given.  So instead kill this check and get the proper index for the raid type we want from the allocator.  Thanks, Loop through raid types is for handling failure in the middle of raid type conversion. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: btrfs-convert fails

2010-10-31 Thread Yan, Zheng
up system chunk  btrfs-convert: extent-tree.c:2529: btrfs_reserve_extent: Assertion     `!(ret)' failed  Abgebrochen Try btrfs-convert -r /dev/xxx, hopefully it will recover your ext2. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message

Re: 2.6.35.4 fumble-spolision

2010-09-10 Thread Yan, Zheng
file to us? Regards Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: machine gets unresponsive during btrfs balance

2010-08-12 Thread Yan, Zheng
in the changelog for 2.6.35.1 I did not try again with this version. Do you have more than one machines? would you please setup netconsole to see what happen. Thanks Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: Code bug or data bug?

2010-08-10 Thread Yan, Zheng
On Tue, Aug 10, 2010 at 6:20 AM, K. Richard Pixley r...@noir.com wrote:  I've just gotten: r...@diamonds:~$ time sudo /sbin/btrfsck /dev/sda7 btrfsck: btrfsck.c:585: splice_shared_node: Assertion `!(src == src_node-root_cache)' failed. Aborted Does this indicate a coding error in btrfsck

Re: [PATCH 7/7] btrfs: fix a wrong error check in add_ra_bio_pages()

2010-07-29 Thread Yan, Zheng
miss here means miss for read-ahead because the page is already in the page cache Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Intermittent no space errors

2010-07-27 Thread Yan, Zheng
to happen less frequently. Any known issues I should be aware of? Thank you for reporting this. I will dig in. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: btrfs: unlinked X orphans messages

2010-07-19 Thread Yan, Zheng
with no raid, vanilla kernel: 2.6.34. Nothing to worry about. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [BUG] btrfs hangup when we run the sync command

2010-07-15 Thread Yan, Zheng
2010/7/15 Miao Xie mi...@cn.fujitsu.com: Hi, everyone I found btrfs will hangup when we run the sync command on my x86_64 box. The reproduce steps is following: # mkfs.btrfs -s 8192 -l 8192 -n 8192 /dev/sda1 # mount /dev/sda1 /mnt # echo 1234567 /mnt/aaa # sync (btrfs hangs up) It

Re: btrfsck segmentation fault + trace

2010-06-16 Thread Yan, Zheng
of metadata space. btrfs in 2.6.35 reserves more metadata space for system use than btrfs in 2.6.34. That's why these error message only appear on 2.6.35. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

Re: Still ENOSPC problems with 2.6.35-rc3

2010-06-16 Thread Yan, Zheng
, btrfs in 2.6.35 reserves more metadata space for system use than older btrfs. If the FS has already ran out of metadata space, using btrfs in 2.6.35 doesn't help. Yan, Zheng [ cut here ] WARNING: at fs/btrfs/extent-tree.c:3441 btrfs_block_rsv_check+0x10c/0x13e

Re: btrfsck segmentation fault + trace

2010-06-16 Thread Yan, Zheng
On Thu, Jun 17, 2010 at 7:26 AM, John Wyzer john.wy...@gmx.de wrote: On 17/06/10 00:45, Yan, Zheng wrote: On Thu, Jun 17, 2010 at 4:25 AM, John Wyzer john.wy...@gmx.de wrote: btrfs: fail to dirty  inode 6634 error -28 [...] (nothing new coming, only error -28) Apart from that, I had messages

Re: Regression in 2.6.35 RC1 (Ubuntu 2.6.35-1-generic)

2010-06-11 Thread Yan, Zheng
: [  209.858441]  RSP 88012821b820 Jun 10 21:23:17 bradf-x301 kernel: [  209.858448] ---[ end trace 32d3e1002acaefc5 ]--- I have already sent a patch for this. http://www.spinics.net/lists/linux-btrfs/msg05150.html Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

[PATCH] btrfs: Fix null dereference in relocation.c

2010-05-31 Thread Yan, Zheng
Fix a potential null dereference in relocation.c Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/relocation.c 2/fs/btrfs/relocation.c --- 1/fs/btrfs/relocation.c 2010-05-26 00:13:07.227605825 +0800 +++ 2/fs/btrfs/relocation.c 2010-05-31 16:35:23.489829633 +0800

[PATCH] btrfs: Fix BUG_ON for fs converted from extN

2010-05-31 Thread Yan, Zheng
Tree blocks can live in data block groups in FS converted from extN. So it's easy to trigger the BUG_ON. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/extent-tree.c 3/fs/btrfs/extent-tree.c --- 1/fs/btrfs/extent-tree.c2010-05-26 23:55:46.610378078 +0800 +++ 3/fs

Re: Disk space accounting and subvolume delete

2010-05-31 Thread Yan, Zheng
On Tue, Jun 1, 2010 at 3:01 AM, Bruce Guenter br...@untroubled.org wrote: On Wed, May 12, 2010 at 01:02:07PM +0800, Yan, Zheng  wrote: Dropping a tree can be lengthy. It's not good to let sync wait for hours. For most linux FS, 'sync' just force an transaction/journal commit. I don't think

Re: [PATCH 2/4] btrfs-convert: Add extent iteration functions.

2010-05-18 Thread Yan, Zheng
On Sat, Mar 20, 2010 at 12:26 PM, Sean Bartell wingedtachik...@gmail.com wrote: A filesystem can have disk extents in arbitrary places on the disk, as well as extents that must be read into memory because they have compression or encryption btrfs doesn't support. These extents can be passed to

Re: [PATCH 1/4] btrfs-convert: make more use of cache_free_extents

2010-05-18 Thread Yan, Zheng
On Sat, Mar 20, 2010 at 12:24 PM, Sean Bartell wingedtachik...@gmail.com wrote: An extent_io_tree is used for all free space information. This allows removal of ext2_alloc_block and ext2_free_block, and makes create_ext2_image less ext2-specific. ---  convert.c |  154

Re: Bug when resizing FS

2010-05-14 Thread Yan, Zheng
On Sat, May 15, 2010 at 12:23 AM, Martin Bueger mbuer...@edu.uni-klu.ac.at wrote: Hello, when I try to resize the FS with btrfsctl -r it works using + or -, hence, extending or shrinking the FS but when I want to set it to a certain size I always hit the follwing bug: [ cut here

[PATCH 1/5] btrfs: pass buffer extent to btrfs_free_tree_block

2010-05-11 Thread Yan, Zheng
prepare for the log code Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/ctree.c 2/fs/btrfs/ctree.c --- 1/fs/btrfs/ctree.c 2010-04-14 14:49:56.342950744 +0800 +++ 2/fs/btrfs/ctree.c 2010-05-11 14:00:04.122357838 +0800 @@ -279,7 +279,8 @@ int btrfs_block_can_be_shared

[PATCH 3/5] btrfs: split btrfs_alloc_free_block()

2010-05-11 Thread Yan, Zheng
split btrfs_alloc_free_block() into btrfs_reserved_tree_block() and btrfs_alloc_reserved_tree_block(). Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 3/fs/btrfs/ctree.h 4/fs/btrfs/ctree.h --- 3/fs/btrfs/ctree.h 2010-05-11 14:09:45.052107958 +0800 +++ 4/fs/btrfs/ctree.h 2010-05-11

[PATCH 4/5] btrfs: don't cache empty block groups during mount

2010-05-11 Thread Yan, Zheng
the tree log recover code expects no free space cached before it executes. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 4/fs/btrfs/extent-tree.c 8/fs/btrfs/extent-tree.c --- 4/fs/btrfs/extent-tree.c2010-05-11 14:15:29.174108554 +0800 +++ 8/fs/btrfs/extent-tree.c2010-05-11

Re: Disk space accounting and subvolume delete

2010-05-11 Thread Yan, Zheng
On Tue, May 11, 2010 at 11:45 PM, Bruce Guenter br...@untroubled.org wrote: On Tue, May 11, 2010 at 08:10:38AM +0800, Yan, Zheng  wrote: This is because the snapshot deleting ioctl only removes the a link. Right, I understand that.  That part is not unexpected, as it works just like unlink

[PATCH] btrfs: Fix block generation verification race

2010-05-02 Thread Yan, Zheng
After the path is released, the generation number got from block pointer is no long valid. The race may cause disk corruption, because verify_parent_transid() calls clear_extent_buffer_uptodate() when generation numbers mismatch. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs

Re: bug when removing device

2010-04-30 Thread Yan, Zheng
] EIP: [f85f3b7e] relocate_tree_blocks+0x52e/0x590 [btrfs] SS:ESP 0068:cd333c14 [  298.660150] ---[ end trace fb3e62da0e52a0bd ]--- I have sent a set of patches that address bugs like this. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

[PATCH V2 01/12] Btrfs: Link block groups of different raid types in the same space_info

2010-04-26 Thread Yan, Zheng
The size of reserved space is stored in space_info. If block groups of different raid types are linked to separate space_info, changing allocation profile will corrupt reserved space accounting. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/ctree.h 3/fs/btrfs/ctree.h

[PATCH V2 02/12] Btrfs: Kill allocate_wait in space_info

2010-04-26 Thread Yan, Zheng
We already have fs_info-chunk_mutex to avoid concurrent chunk creation. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/ctree.h 3/fs/btrfs/ctree.h --- 2/fs/btrfs/ctree.h 2010-04-26 17:24:10.436081649 +0800 +++ 3/fs/btrfs/ctree.h 2010-04-26 17:24:10.441079491 +0800

[PATCH V2 04/12] Btrfs: Kill init_btrfs_i()

2010-04-26 Thread Yan, Zheng
All code in init_btrfs_i can be moved into btrfs_alloc_inode() Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/inode.c 3/fs/btrfs/inode.c --- 2/fs/btrfs/inode.c 2010-04-26 17:24:41.254078880 +0800 +++ 3/fs/btrfs/inode.c 2010-04-26 17:24:41.270103836 +0800 @@ -3595,40

[PATCH V2 08/12] Btrfs: Introduce global metadata reservation

2010-04-26 Thread Yan, Zheng
Reserve metadata space for extent tree, checksum tree and root tree Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/ctree.h 3/fs/btrfs/ctree.h --- 2/fs/btrfs/ctree.h 2010-04-26 17:27:31.644829469 +0800 +++ 3/fs/btrfs/ctree.h 2010-04-26 17:27:31.648830941 +0800 @@ -682,21

[PATCH V2 07/12] Btrfs: Update metadata reservation for delayed allocation

2010-04-26 Thread Yan, Zheng
. This change is important if set/clear_extent_bit involves multiple extent_state. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/btrfs_inode.h 3/fs/btrfs/btrfs_inode.h --- 2/fs/btrfs/btrfs_inode.h2010-04-26 17:26:55.450105767 +0800 +++ 3/fs/btrfs/btrfs_inode.h2010-04

[PATCH V2 09/12] Btrfs: Metadata reservation for orphan inodes

2010-04-26 Thread Yan, Zheng
reserve metadata space for handling orphan inodes Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/btrfs_inode.h 3/fs/btrfs/btrfs_inode.h --- 2/fs/btrfs/btrfs_inode.h2010-04-26 17:27:52.113080051 +0800 +++ 3/fs/btrfs/btrfs_inode.h2010-04-26 17:27:52.118079430 +0800

[PATCH V2 10/12] Btrfs: Metadata ENOSPC handling for tree log

2010-04-26 Thread Yan, Zheng
Previous patches make the allocater return -ENOSPC if there is no unreserved free metadata space. This patch updates tree log code and various other places to propagate/handle the ENOSPC error. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/disk-io.c 3/fs/btrfs/disk-io.c

[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation

2010-04-26 Thread Yan, Zheng
Pre-allocate space for data relocation. This can detect ENOPSC condition caused by fragmentation of free space. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/ctree.h 3/fs/btrfs/ctree.h --- 2/fs/btrfs/ctree.h 2010-04-26 17:28:20.493839748 +0800 +++ 3/fs/btrfs/ctree.h

[PATCH 10/12] Btrfs: Metadata ENOSPC handling for tree log

2010-04-19 Thread Yan, Zheng
Previous patches make the allocater return -ENOSPC if there is no unreserved free meta space. This patch updates tree log code and various other places to propagate/handle the ENOSPC error. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 10/fs/btrfs/disk-io.c 11/fs/btrfs/disk-io.c

[PATCH 09/12] Btrfs: Metadata reseravtion for orphan inodes

2010-04-19 Thread Yan, Zheng
reserve metadata space for handling orphan inodes Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 9/fs/btrfs/btrfs_inode.h 10/fs/btrfs/btrfs_inode.h --- 9/fs/btrfs/btrfs_inode.h2010-04-18 10:26:38.326701000 +0800 +++ 10/fs/btrfs/btrfs_inode.h 2010-04-18 10:50:26.564697845 +0800

[PATCH 07/12] Btrfs: Update metadata reservation for delayed allocation

2010-04-19 Thread Yan, Zheng
. This change is important if set/clear_extent_bit involves multiple extent_state. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 7/fs/btrfs/btrfs_inode.h 8/fs/btrfs/btrfs_inode.h --- 7/fs/btrfs/btrfs_inode.h2010-04-13 15:44:56.104814000 +0800 +++ 8/fs/btrfs/btrfs_inode.h2010-04

[PATCH 03/12] Btrfs: Shrink delay allocated space in a synchronized way

2010-04-19 Thread Yan, Zheng
Shrink delay allocated space in a synchronized manner is more controllable than flushing all delay allocated space in an async thread. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 3/fs/btrfs/ctree.h 4/fs/btrfs/ctree.h --- 3/fs/btrfs/ctree.h 2010-04-18 08:13:15.457699211 +0800

[PATCH 01/12] Btrfs: Link block groups of different raid types in the same space_info

2010-04-19 Thread Yan, Zheng
The size of reserved space is stored in space_info. If block groups of different raid types are linked to separate space_info, changing allocation profile will corrupt reserved space accounting. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/ctree.h 2/fs/btrfs/ctree.h

[PATCH 02/12] Btrfs: Kill allocate_wait in space_info

2010-04-19 Thread Yan, Zheng
We already have fs_info-chunk_mutex to avoid concurrent chunk creation. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 2/fs/btrfs/ctree.h 3/fs/btrfs/ctree.h --- 2/fs/btrfs/ctree.h 2010-04-18 08:12:22.086699485 +0800 +++ 3/fs/btrfs/ctree.h 2010-04-18 08:13:15.457699211 +0800

[PATCH 05/12] Btrfs: Introduce contexts for metadata reseravtion

2010-04-19 Thread Yan, Zheng
Introducing contexts for metadata reseravtion has two major advantages. First, it makes metadata reseravtion more traceable. Second, it can reclaim freed space and re-add them to the itself after transaction committed. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 5/fs/btrfs

[PATCH 04/12] Btrfs: Kill init_btrfs_i()

2010-04-19 Thread Yan, Zheng
All code in init_btrfs_i can be moved into btrfs_alloc_inode() Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 4/fs/btrfs/inode.c 5/fs/btrfs/inode.c --- 4/fs/btrfs/inode.c 2010-04-18 08:13:48.183698829 +0800 +++ 5/fs/btrfs/inode.c 2010-04-18 10:59:07.534719917 +0800 @@ -3595,40

Re: [PATCH 02/12] Btrfs: Kill allocate_wait in space_info

2010-04-19 Thread Yan, Zheng
the same time and end up allocating twice the amount of space, which is why I did the waitqueue thing.  It seems like this is still a possibility with your patch.  Thanks, This is impossible because the very first thing do_chunk_alloc does is lock the chunk_mutex. Yan, Zheng -- To unsubscribe from

Re: [PATCH 02/12] Btrfs: Kill allocate_wait in space_info

2010-04-19 Thread Yan, Zheng
On Mon, Apr 19, 2010 at 10:48 PM, Josef Bacik jo...@redhat.com wrote: On Mon, Apr 19, 2010 at 10:46:12PM +0800, Yan, Zheng wrote: On Mon, Apr 19, 2010 at 9:57 PM, Josef Bacik jo...@redhat.com wrote: The purpose of maybe_allocate_chunk was that there is no way to know if some other CPU

Re: kernel BUG at /home/mafra/linux-2.6/fs/btrfs/volumes.c:2828!

2010-04-08 Thread Yan, Zheng
fixed by commit http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-unstable.git;a=commit;h=9f680ce04ea19dabbbafe01b57b61930a9b70741 Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH] Btrfs: fix chunk allocate size calculation

2010-04-06 Thread Yan, Zheng
On Thu, Mar 18, 2010 at 4:45 AM, Josef Bacik jo...@redhat.com wrote: If the amount of free space left in a device is less than what we think should be the minimum size, just ignore the minimum size and use the amount we have.  I ran into this running tests on a 600mb volume, the chunk

Re: Oops on btrfs filesystem balance

2010-03-25 Thread Yan, Zheng
' parameter for page_cache_sync_readahead is NULL in this case. Commit 0141450f66c3c12a3aaa869748caa64241885cdf added code that dereference 'filp'. Fengguang, would you please fix this. Regards Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH] Btrfs: fix ENOSPC accounting when max_extent is not maxed out V2

2010-03-19 Thread Yan, Zheng
On Fri, Mar 19, 2010 at 9:59 PM, Josef Bacik jo...@redhat.com wrote: On Fri, Mar 19, 2010 at 11:09:25AM +0800, Yan, Zheng  wrote: On Thu, Mar 18, 2010 at 11:47 PM, Josef Bacik jo...@redhat.com wrote: A user reported a bug a few weeks back where if he set max_extent=1m and then did a dd

Re: [PATCH] btrfs: btrfs_mark_extent_written writes correctly slot

2010-02-10 Thread Yan, Zheng
); btrfs_set_file_extent_num_bytes(leaf, fi, Acked-by: Yan Zheng zheng@oracle.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs: fix race between allocate and release extent buffer.

2010-02-04 Thread Yan, Zheng
Increase extent buffer's reference count while holding the lock. Otherwise it can race with try_release_extent_buffer. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/extent_io.c 2/fs/btrfs/extent_io.c --- 1/fs/btrfs/extent_io.c 2010-01-17 15:48:16.770302026 +0800

Re: [PATCH] btrfs: fix race between allocate and release extent buffer.

2010-02-04 Thread Yan, Zheng
On 02/04/2010 04:46 PM, Yan, Zheng wrote: Increase extent buffer's reference count while holding the lock. Otherwise it can race with try_release_extent_buffer. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/extent_io.c 2/fs/btrfs/extent_io.c --- 1/fs/btrfs

Re: btrfs-vol -b endless loop

2010-02-03 Thread Yan, Zheng
to fragments of free space. I'm working on make 'btrfs-vol -b' return -ENOSPC in this case. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs: Fix oopsen when dropping empty tree.

2010-01-31 Thread Yan, Zheng
When dropping a empty tree, walk_down_tree() skips checking extent information for the tree root. This will triggers a BUG_ON in walk_up_proc(). Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs/extent-tree.c 2/fs/btrfs/extent-tree.c --- 1/fs/btrfs/extent-tree.c2010-01

[PATCH] btrfsck: Remove superfluous WARN_ON

2010-01-31 Thread Yan, Zheng
Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp btrfs-progs-unstable/btrfsck.c btrfs-progs-2/btrfsck.c --- btrfs-progs-unstable/btrfsck.c 2009-09-28 15:54:55.980479398 +0800 +++ btrfs-progs-2/btrfsck.c 2010-01-31 09:46:24.645485459 +0800 @@ -581,7 +581,6 @@ again

Re: panic during rebalance, and now upon mount

2010-01-31 Thread Yan, Zheng
On Mon, Feb 1, 2010 at 3:33 AM, Troy Ablan tab...@gmail.com wrote: Yan, Zheng wrote: Please try the patch attached below. It should solve the bug during mounting that fs. But I don't know why there are so many link count errors in that fs. How old is that fs? what was that fs used

Re: panic during rebalance, and now upon mount

2010-01-30 Thread Yan, Zheng
this. Would you please run btrsck and mount that fs again with the debug patch attached below. Regards Yan, Zheng --- diff -urp 1/fs/btrfs/extent-tree.c 2/fs/btrfs/extent-tree.c --- 1/fs/btrfs/extent-tree.c2010-01-22 12:16:34.203525744 +0800 +++ 2/fs/btrfs/extent-tree.c2010-01-30 20:03

Re: [PATCH]btrfs: avoid comparing with NULL pointer

2010-01-27 Thread Yan, Zheng
: Chris Mason chris.ma...@oracle.com Cc: Yan Zheng zheng@oracle.com Cc: Josef Bacik jba...@redhat.com Cc: Jens Axboe jens.ax...@oracle.com Cc: linux-btrfs@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- fs/btrfs/disk-io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions

Re: btrfs fsck doesn't modify a thing, and btrfs can not balance any data on a new device

2010-01-27 Thread Yan, Zheng
to save your data is try mounting the FS in readonly mode and copying the data out. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Btrfs: fix another orphan cleanup problem

2010-01-25 Thread Yan, Zheng
changes and add code to open_ctree() to do orphan cleanup for the default subvol. Regards Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC] make btrfs-image work

2010-01-19 Thread Yan, Zheng
to offset of device. Yan, Zheng -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs: Fix race in btrfs_mark_extent_written

2010-01-15 Thread Yan, Zheng
Fix bug reported by Johannes Hirte. The reason of that bug is btrfs_del_items is called after btrfs_duplicate_item and btrfs_del_items triggers tree balance. The fix is check that case and call btrfs_search_slot when needed. Signed-off-by: Yan Zheng zheng@oracle.com --- diff -urp 1/fs/btrfs

  1   2   3   >