Re: [PATCH 30/31] ext4: eliminate xattr entry e_hash recalculation for removes

2017-06-15 Thread Jan Kara
= (__le32 *)((char *)header + > + __le32 *value = (__le32 *)((char *)value_base + > le16_to_cpu(entry->e_value_offs)); > for (n = (le32_to_cpu(entry->e_value_size) + >EXT4_XATTR_ROUND) >> EXT4_XATTR_PAD_BITS; n; n--) { > @@ -2945,13 +2949,11 @@ static inline void ext4_xattr_hash_entry(struct > ext4_xattr_header *header, > * > * Re-compute the extended attribute hash value after an entry has changed. > */ > -static void ext4_xattr_rehash(struct ext4_xattr_header *header, > - struct ext4_xattr_entry *entry) > +static void ext4_xattr_rehash(struct ext4_xattr_header *header) > { > struct ext4_xattr_entry *here; > __u32 hash = 0; > > - ext4_xattr_hash_entry(header, entry); > here = ENTRY(header+1); > while (!IS_LAST_ENTRY(here)) { > if (!here->e_hash) { > -- > 2.13.1.508.gb3defc5cc-goog > > -- Jan Kara SUSE Labs, CR

Re: udf: allow implicit blocksize specification during mount

2017-06-15 Thread Jan Kara
On Wed 14-06-17 21:36:45, Pali Rohár wrote: > On Tuesday 13 June 2017 14:59:55 Jan Kara wrote: > > Hi, > > > > On Mon 12-06-17 22:40:14, Pali Rohár wrote: > > > Hi! I found that following UDF patch was included into linus tree: > > > https://patchwork.kerne

Re: [PATCH v3 08/14] x86, dax, libnvdimm: move wb_cache_pmem() to libnvdimm

2017-06-15 Thread Jan Kara
On Wed 14-06-17 09:49:29, Dan Williams wrote: > On Wed, Jun 14, 2017 at 3:54 AM, Jan Kara wrote: > >> -/** > >> - * arch_wb_cache_pmem - write back a cache range with CLWB > >> - * @vaddr: virtual start address > >> - * @size:number of bytes to wr

Re: [PATCH v4 13/14] libnvdimm, pmem: gate cache management on QUEUE_FLAG_WC in pmem_dax_flush()

2017-06-15 Thread Jan Kara
ilcox > Cc: Ross Zwisler > Suggested-by: Jan Kara > Signed-off-by: Dan Williams Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > Changes since v3: > * move the check of QUEUE_FLAG_WC into t

Re: [PATCH 28/28] quota: add extra inode count to dquot transfer functions

2017-06-15 Thread Jan Kara
eiserfs_write_unlock(inode->i_sb); > if (error) > goto out; > - error = dquot_transfer(inode, attr); > + error = dquot_transfer(inode, attr, 0); > reiserfs_write_lock(inode->i_sb); >

Re: [PATCH 23/28] mbcache: make mbcache more generic

2017-06-15 Thread Jan Kara
ntry */ > + cache_value_t e_value; > }; > > struct mb_cache *mb_cache_create(int bucket_bits); > void mb_cache_destroy(struct mb_cache *cache); > > int mb_cache_entry_create(struct mb_cache *cache, gfp_t mask, u32 key, > - sector_t block, bool reusable); > + cache_value_t value, bool reusable); > void __mb_cache_entry_free(struct mb_cache_entry *entry); > static inline int mb_cache_entry_put(struct mb_cache *cache, >struct mb_cache_entry *entry) > @@ -38,10 +40,10 @@ static inline int mb_cache_entry_put(struct mb_cache > *cache, > return 1; > } > > -void mb_cache_entry_delete_block(struct mb_cache *cache, u32 key, > - sector_t block); > +void mb_cache_entry_delete(struct mb_cache *cache, u32 key, > +cache_value_t value); > struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *cache, u32 key, > - sector_t block); > + cache_value_t value); > struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, >u32 key); > struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache *cache, > -- > 2.13.0.219.gdb65acc882-goog > > -- Jan Kara SUSE Labs, CR

Re: [PATCH v3 03/14] filesystem-dax: convert to dax_copy_from_iter()

2017-06-14 Thread Jan Kara
d: Reviewed-by: Jan Kara Honza > --- > arch/x86/include/asm/pmem.h | 50 > --- > fs/dax.c|3 ++- > include/linux/pmem.h| 24 -

Re: [PATCH v3 04/14] dax, pmem: introduce an optional 'flush' dax_operation

2017-06-14 Thread Jan Kara
range specified by the NFIT. So, this "no flush" > property might be something passed down by the bus / libnvdimm. > > Cc: Christoph Hellwig > Cc: Matthew Wilcox > Cc: Ross Zwisler > Signed-off-by: Dan Williams

Re: [PATCH v3 06/14] filesystem-dax: convert to dax_flush()

2017-06-14 Thread Jan Kara
e management work when the underlying driver does not > specify a flush method. > > We still do all the dirty tracking since the radix entry will already be > there for locking purposes. However, the work to clean the entry will be > a nop for some dax drivers. > > Cc: Jan Kara

Re: [PATCH v3 07/14] x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush

2017-06-14 Thread Jan Kara
y. > > With clear_pmem() gone we can follow on with a patch to make pmem cache > management completely defined within the pmem driver. > > Cc: > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Ingo Molnar > Cc: Christoph Hellwig > Cc: "H. Peter Anvin" > Cc: Th

Re: [PATCH v3 08/14] x86, dax, libnvdimm: move wb_cache_pmem() to libnvdimm

2017-06-14 Thread Jan Kara
efined > for x86_64, but it is straightforward to add other archs in the future. > > Cc: > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Ingo Molnar > Cc: Christoph Hellwig > Cc: "H. Peter Anvin" > Cc: Thomas Gleixner > Cc: Oliver O'Halloran > Cc: Matth

Re: [PATCH v3 09/14] x86, libnvdimm, pmem: move arch_invalidate_pmem() to libnvdimm

2017-06-14 Thread Jan Kara
On Fri 09-06-17 13:24:35, Dan Williams wrote: > Kill this globally defined wrapper and move to libnvdimm so that we can > ultimately remove include/linux/pmem.h. > > Cc: > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Ingo Molnar > Cc: Christoph Hellwig > Cc: "H. Pet

Re: [PATCH v3 10/14] pmem: remove global pmem api

2017-06-14 Thread Jan Kara
On Fri 09-06-17 13:24:40, Dan Williams wrote: > Now that all callers of the pmem api have been converted to dax helpers that > call back to the pmem driver, we can remove include/linux/pmem.h. > > Cc: > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Ingo Molnar > Cc: Christoph H

Re: [PATCH v3 13/14] filesystem-dax: gate calls to dax_flush() on QUEUE_FLAG_WC

2017-06-14 Thread Jan Kara
ing purposes this patch only disables the cache flush > loop, not the dirty tracking. > > Userspace can override the default cache setting via the block device > queue "write_cache" attribute in sysfs. > > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Christoph Hel

Re: UDF & dstring

2017-06-14 Thread Jan Kara
understood the spec correctly. What I think we should do is to make udf-tools and blkid accept both variants but create the one defined in the spec (to have higher chances for interoperability). Honza -- Jan Kara SUSE Labs, CR

Re: udf: allow implicit blocksize specification during mount

2017-06-13 Thread Jan Kara
ore, so it can be deleted. I think its name was incorrect as default > block size for UDF should be logical block size of disk, not hardcoded > value 2048 which is logical block size for optical media. Thanks. Removed. Honza -- Jan Kara SUSE Labs, CR

Re: [RFC PATCH] fs: ext4: don't trap kswapd and allocating tasks on ext4 inode IO

2017-06-12 Thread Jan Kara
On Mon 12-06-17 10:37:27, Johannes Weiner wrote: > On Mon, Jun 12, 2017 at 10:09:57AM +0200, Jan Kara wrote: > > On Tue 16-05-17 18:03:37, Jan Kara wrote: > > > On Tue 16-05-17 11:41:05, Johannes Weiner wrote: > > > > On Tue, May 16, 2017 at 04:36:45PM +0200, Jan Kara

Re: [PATCH] mm/list_lru.c: use cond_resched_lock() for nlru->lock

2017-06-12 Thread Jan Kara
_emergency_remount+0xb0 > [] process_one_work+0x228 > [] worker_thread+0x2e0 > [] kthread+0xf4 > [] ret_from_fork+0x10 > > Link: http://marc.info/?t=14951151482&r=1&w=2 > Fix-suggested-by: Jan kara > Signed-off-by: Sahitya Tummala Looks good to me. You can add: Reviewed

Re: [RFC v4 00/20] Speculative page faults

2017-06-12 Thread Jan Kara
| 1 + > mm/internal.h| 20 > mm/madvise.c | 4 + > mm/memory.c | 291 > +++++++---- > mm/mempolicy.c | 10 +- > mm/mlock.c | 9 +- > mm/mmap.c| 123 +++- > mm/mprotect.c| 2 + > mm/mremap.c | 7 ++ > 15 files changed, 435 insertions(+), 81 deletions(-) > > -- > 2.7.4 > -- Jan Kara SUSE Labs, CR

Re: [PATCH 1/8] rbtree: Cache leftmost node internally

2017-06-12 Thread Jan Kara
arly for other functions like __rb_insert()... It would seem like less > >churn and I don't see downside to it... > > I propagate args so we don't have to duplicate the checks between the regular > and augmented rbtrees. OK, yeah. Feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR

Re: [RFC PATCH] fs: ext4: don't trap kswapd and allocating tasks on ext4 inode IO

2017-06-12 Thread Jan Kara
On Tue 16-05-17 18:03:37, Jan Kara wrote: > On Tue 16-05-17 11:41:05, Johannes Weiner wrote: > > On Tue, May 16, 2017 at 04:36:45PM +0200, Jan Kara wrote: > > > On Mon 15-05-17 11:46:34, Johannes Weiner wrote: > > > > We have observed across several workloa

Re: [PATCH 1/8] rbtree: Cache leftmost node internally

2017-06-09 Thread Jan Kara
than 1 child (easy!) Why do you propagate e.g. 'leftmost' down to __rb_erase_augmented() when you could just handle everything within rb_erase_augmented_cached? Similarly for other functions like __rb_insert()... It would seem like less churn and I don't see downside to it... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH] dax: improve fix for colliding PMD & PTE entries

2017-05-29 Thread Jan Kara
gt; - if (!pmd_none(*vmf->pmd)) > + if (!pmd_none(*vmf->pmd) && !pmd_trans_huge(*vmf->pmd) && > + !pmd_devmap(*vmf->pmd)) { > + result = 0; > goto unlock_entry; > + } > > /* >* Note that we don't use iomap_apply here. We aren't doing I/O, only > -- > 2.9.4 > -- Jan Kara SUSE Labs, CR

Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread

2017-05-29 Thread Jan Kara
> console_sem before it goes into sleep. > > > The advantages: > >+ all messages are handled synchronously if there is not > a flood of messages > >+ if there is the flood of messages; kthread works only > as a fallback; processes that produce the messages > are involved into handling the console (nature throttling); > the messages appear on the console even when printk_kthread > is sleeping; but the softlockup is prevented > > => it should work pretty well in all situations, including the flood >of messages and sudden dead. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2] ext4: fix quota charging for shared xattr blocks

2017-05-24 Thread Jan Kara
e ext4_inode_info->i_dquot is not initialized yet. > > Add dquot_initialize() to call paths that lead to ext4_xattr_block_set(). > > Signed-off-by: Tahsin Erdogan Looks good to me. You can add: Reviewed-by: Jan Kara

Re: [PATCH 0/3] add fallback reason strings to DAX PMD path

2017-05-24 Thread Jan Kara
some common fallback paths that you'd think are worth detecting and it's not easy to add information to the final tracepoint, then we can add a specific tracepoint to that branch. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 2/2] dax: Fix race between colliding PMD & PTE entries

2017-05-23 Thread Jan Kara
testing these races result in the following types of errors: > > BUG: Bad rss-counter state mm:8800a817d280 idx:1 val:1 > BUG: non-zero nr_ptes on freeing mm: 15 > > Fix this issue by having the DAX fault handler

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-23 Thread Jan Kara
On Mon 22-05-17 15:09:33, Jeff Layton wrote: > On Mon, 2017-05-22 at 19:53 +0200, Jan Kara wrote: > > On Mon 22-05-17 09:53:21, Jeff Layton wrote: > > > On Mon, 2017-05-22 at 15:38 +0200, Jan Kara wrote: > > > > > In the case of something like ext2, could we inst

Re: [RFC PATCH] fs: block dev aio request priority support

2017-05-23 Thread Jan Kara
t; index bb2554f..415980d 100644 > --- a/include/uapi/linux/aio_abi.h > +++ b/include/uapi/linux/aio_abi.h > @@ -54,6 +54,12 @@ enum { > */ > #define IOCB_FLAG_RESFD (1 << 0) > > +/* > + * IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb" > + *is interpreted as an I/O scheduling class and priority > + */ > +#define IOCB_FLAG_IOPRIO (1 << 1) > + > /* read() from /dev/aio returns these structures. */ > struct io_event { > __u64 data; /* the data field from the iocb */ > -- > 2.7.4 > -- Jan Kara SUSE Labs, CR

Re: [PATCH] ext4: fix quota charging for shared xattr blocks

2017-05-23 Thread Jan Kara
ck_xattr(inode, &no_expand); > > error = ext4_reserve_inode_write(handle, inode, &is.iloc); > -- > 2.13.0.219.gdb65acc882-goog > -- Jan Kara SUSE Labs, CR

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-22 Thread Jan Kara
On Mon 22-05-17 09:53:21, Jeff Layton wrote: > On Mon, 2017-05-22 at 15:38 +0200, Jan Kara wrote: > > On Fri 19-05-17 15:20:52, Jeff Layton wrote: > > > On Mon, 2017-05-15 at 12:42 +0200, Jan Kara wrote: > > > > On Tue 09-05-17 11:49:18, Jeff Layton wrote: > >

Re: [PATCH 2/2] dax: Fix race between colliding PMD & PTE entries

2017-05-22 Thread Jan Kara
t; + * our page tables. > + */ > + split_huge_pmd(vmf->vma, vmf->pmd, vmf->address); > + Can we just check the PMD and if is isn't as we want it, bail out and retry the fault? IMHO it will be more obvious that way (and also more in line like these races are handled for the classical THP). Otherwise the patch looks good to me. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 1/2] mm: avoid spurious 'bad pmd' warning messages

2017-05-22 Thread Jan Kara
ation until we have > page to map") > Cc: sta...@vger.kernel.org With the change requested by Dave this looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > mm/memory.c | 4 ++-- > 1 file c

Re: [PATCH 2/2] dax: Fix race between colliding PMD & PTE entries

2017-05-22 Thread Jan Kara
On Thu 18-05-17 15:29:39, Ross Zwisler wrote: > On Thu, May 18, 2017 at 09:50:37AM +0200, Jan Kara wrote: > > On Wed 17-05-17 11:16:39, Ross Zwisler wrote: > > > We currently have two related PMD vs PTE races in the DAX code. These can > > > both be easily triggered by

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-22 Thread Jan Kara
On Fri 19-05-17 15:20:52, Jeff Layton wrote: > On Mon, 2017-05-15 at 12:42 +0200, Jan Kara wrote: > > On Tue 09-05-17 11:49:18, Jeff Layton wrote: > > > Now that we have a better way to store and report errors that occur > > > during writeback, we need to convert the

Re: [PATCH v2] jbd2: preserve original nofs flag during journal restart

2017-05-18 Thread Jan Kara
start a new nofs context. >*/ Yeah, this is much better. Tahsin, please use Michal's version. Thanks! Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/2] dax: Fix race between colliding PMD & PTE entries

2017-05-18 Thread Jan Kara
> /* > + * It is possible, particularly with mixed reads & writes to private > + * mappings, that we have raced with a PTE fault that overlaps with > + * the PMD we need to set up. If so we just fall back to a PTE fault > + * ourselves. > + */ > + if (!pmd_none(*vmf->pmd)) > + goto unlock_entry; > + > + /* >* Note that we don't use iomap_apply here. We aren't doing I/O, only >* setting up a mapping, so really we're using iomap_begin() as a way >* to look up our filesystem block. > -- > 2.9.4 > -- Jan Kara SUSE Labs, CR

Re: [PATCH] jbd2: preserve original nofs flag during journal restart

2017-05-17 Thread Jan Kara
> we start a new transaction? I thought we were doing that already but the > code is so convoluted I have hard time to wrap my head around it. I was thinking about his as well but the fact is jbd2__journal_restart() actually does equivalent of jbd2_journal_stop() for the handle above the place where memalloc_nofs_restore() was added so in this sense we really miss memalloc_nofs_restore() there... So what Tahsin did makes sense. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH] jbd2: preserve original nofs flag during journal restart

2017-05-17 Thread Jan Kara
rt() > jbd2_journal_stop() > > Make jbd2__journal_restart() restore the original value before calling > start_this_handle(). > > Fixes: 81378da64de6 ("jbd2: mark the transaction context with the scope > GFP_NOFS context") > Signed-off-by: Tahsin Erdogan Thanks for

Re: [RFC PATCH] fs: ext4: don't trap kswapd and allocating tasks on ext4 inode IO

2017-05-16 Thread Jan Kara
On Tue 16-05-17 11:41:05, Johannes Weiner wrote: > On Tue, May 16, 2017 at 04:36:45PM +0200, Jan Kara wrote: > > On Mon 15-05-17 11:46:34, Johannes Weiner wrote: > > > We have observed across several workloads situations where kswapd and > > > direct reclaimers get stu

Re: [RFC PATCH] fs: ext4: don't trap kswapd and allocating tasks on ext4 inode IO

2017-05-16 Thread Jan Kara
es and i_datasync_tid just happens to be set to the current transaction because it is initialized that way and we are evicting inode that was recently read from disk. Anyway if you add: "&& inode->i_data.nrpages" to the test in ext4_evict_inode() do the stalls go away? Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 19/36] fs: jbd2: make jbd2_journal_start() kernel-doc parseable

2017-05-15 Thread Jan Kara
ooks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/transaction.c | 38 +++--- > 1 file changed, 19 insertions(+), 19 deletions(-) > > diff --git a/fs/jbd2/transaction.

Re: [PATCH 24/36] fs: jbd2: escape a string with special chars on a kernel-doc

2017-05-15 Thread Jan Kara
On Fri 12-05-17 11:00:07, Mauro Carvalho Chehab wrote: > kernel-doc will try to interpret a foo() string, except if > properly escaped. > > Signed-off-by: Mauro Carvalho Chehab Looks good. You can add: Reviewed-

Re: [PATCH v4 21/27] mm: clean up error handling in write_one_page

2017-05-15 Thread Jan Kara
riteback error since then. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > mm/page-writeback.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) &g

Re: [PATCH v4 22/27] jbd2: don't reset error in journal_finish_inode_data_buffers

2017-05-15 Thread Jan Kara
On Tue 09-05-17 11:49:25, Jeff Layton wrote: > Now that we don't clear writeback errors after fetching them, there is > no need to reset them. This is also potentially racy. > > Signed-off-by: Jeff Layton Looks good. You can add: Revi

Re: [PATCH v4 19/27] buffer: set errors in mapping at the time that the error occurs

2017-05-15 Thread Jan Kara
heck this flag in order to set the error in the > mapping. > > This sets the error in the mapping earlier, at the time that it's first > detected. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Small nits below. > @@ -354,7 +354

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-15 Thread Jan Kara
etadata mapping (and this is not a problem specific to f2fs. For example ext2 also uses this scheme where block devices' mapping is the metadata mapping). And we need to merge error information from these two mappings so for the stamping scheme to work, we'd need two stamps stored in struct file. One for data mapping and one for metadata mapping. Or maybe there's some more clever scheme but for now I don't see one... Honza -- Jan Kara SUSE Labs, CR

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-05-12 Thread Jan Kara
On Thu 11-05-17 14:59:43, J. Bruce Fields wrote: > On Wed, Apr 05, 2017 at 02:14:09PM -0400, J. Bruce Fields wrote: > > On Wed, Apr 05, 2017 at 10:05:51AM +0200, Jan Kara wrote: > > > 1) Keep i_version as is, make clients also check for i_ctime. > > > > That would

Re: [PATCH v4 14/27] fs: new infrastructure for writeback error handling and reporting

2017-05-10 Thread Jan Kara
On Wed 10-05-17 08:19:50, Jeff Layton wrote: > On Wed, 2017-05-10 at 13:48 +0200, Jan Kara wrote: > > On Tue 09-05-17 11:49:17, Jeff Layton wrote: > > > diff --git a/fs/file_table.c b/fs/file_table.c > > > index 954d510b765a..d6138b6411ff 100644 > > >

Re: [PATCH v4 14/27] fs: new infrastructure for writeback error handling and reporting

2017-05-10 Thread Jan Kara
false report of success. > > The new behavior is still consistent with the POSIX spec, and is more > reliable for application developers. This patch just adds some basic > infrastructure for doing this. Later patches will change the existing > code to use this new infrastructu

Re: [PATCH v4 13/27] lib: add errseq_t type and infrastructure for handling it

2017-05-10 Thread Jan Kara
*/ > + new = old | ERRSEQ_SEEN; > + if (new != old) > + cmpxchg(eseq, old, new); > + *since = new; > + err = -(new & MAX_ERRNO); > + } > + return err; > +} > +EXPORT_SYMBOL(errseq_check_and_advance); Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v4 12/27] cifs: set mapping error when page writeback fails in writepage or launder_pages

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:15, Jeff Layton wrote: > Signed-off-by: Jeff Layton > Reviewed-by: Christoph Hellwig Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/cifs/file.c | 12 +++- >

Re: [PATCH v4 11/27] fuse: set mapping error in writepage_locked when it fails

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:14, Jeff Layton wrote: > This ensures that we see errors on fsync when writeback fails. > > Signed-off-by: Jeff Layton > Reviewed-by: Christoph Hellwig Looks good to me. You can add: Reviewed-

Re: [PATCH v4 05/27] btrfs: btrfs_wait_tree_block_writeback can be void return

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:08, Jeff Layton wrote: > Nothing checks its return value. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/btrfs/disk-io.c | 6 +++--- &

Re: [PATCH v4 01/27] fs: remove unneeded forward definition of mm_struct from fs.h

2017-05-10 Thread Jan Kara
On Tue 09-05-17 11:49:04, Jeff Layton wrote: > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > include/linux/fs.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --g

Re: [PATCH v2 1/2] dax: prevent invalidation of mapped DAX entries

2017-05-05 Thread Jan Kara
. > > Signed-off-by: Ross Zwisler > Fixes: c6dcf52c23d2 ("mm: Invalidate DAX radix tree entries only if > appropriate") > Reported-by: Jan Kara > Reviewed-by: Jan Kara > Cc: [4.10+] Ah, I've just sent out a series which contains these two patches and anoth

Re: [PATCH 2/2] dax: fix data corruption due to stale mmap reads

2017-05-04 Thread Jan Kara
ore DAX special casing up into the > mm/truncate.c code. > > Or am I missing something? No, my thinking was to put the invalidation at the end of invalidate_inode_pages2_range(). I agree it means more special-casing for DAX in mm/truncate.c. Honza -- Jan Kara SUSE Labs, CR

Re: [BUG] cannot mount nfs, bisected to 0db10944a76ba ("nfs: Convert to separately allocated bdi")

2017-05-04 Thread Jan Kara
On Wed 03-05-17 19:19:11, Corentin Labbe wrote: > On Wed, May 03, 2017 at 01:44:54PM +0200, Jan Kara wrote: > > On Tue 02-05-17 19:22:22, Corentin Labbe wrote: > > > On Tue, May 02, 2017 at 06:27:04PM +0200, Jan Kara wrote: > > > > Hello, > > > > > &

Re: [BUG] cannot mount nfs, bisected to 0db10944a76ba ("nfs: Convert to separately allocated bdi")

2017-05-03 Thread Jan Kara
On Tue 02-05-17 19:22:22, Corentin Labbe wrote: > On Tue, May 02, 2017 at 06:27:04PM +0200, Jan Kara wrote: > > Hello, > > > > On Fri 28-04-17 11:56:24, Corentin Labbe wrote: > > > Since linux next-20170421, mounting nfs give me: > > >

Re: [PATCH] btrfs: always write superblocks synchronously

2017-05-03 Thread Jan Kara
synchronous since they can block progress of the > journalling (commit, log syncs) machinery and thus the whole filesystem. > > [1] https://www.spinics.net/lists/linux-ext4/msg56238.html > > Fixes: b685d3d65ac (block: treat REQ_FUA and REQ_PREFLUSH as synchronous) > Cc: stab

Re: [BUG] cannot mount nfs, bisected to 0db10944a76ba ("nfs: Convert to separately allocated bdi")

2017-05-02 Thread Jan Kara
with: "mount.nfs: Cannot allocate memory" I've tried reproducing this (both with NFSv3 and NFSv4) and failed. Also I have looked through the code and I fail to see how this could happen. Is this the only NFS mount that you have on your system? Didn't also the W

Re: [BUG] cannot mount nfs, bisected to 0db10944a76ba ("nfs: Convert to separately allocated bdi")

2017-04-28 Thread Jan Kara
_mount+0x54/0x128) > [ 774.995921] [] (vfs_kern_mount) from [] > (do_mount+0x158/0xc7c) > [ 774.995935] [] (do_mount) from [] (SyS_mount+0x8c/0xb4) > [ 774.995949] [] (SyS_mount) from [] > (ret_fast_syscall+0x0/0x3c) > [ 774.995958] ---[ end trace 0665e451f8864ff1 ]--- > > The mount command is > mount -t nfs -o tcp,hard,intr,async,rsize=4096,wsize=4096 > 192.168.1.100:/mnt/local_kernel /usr/src/ > > the mount command failling with: "mount.nfs: Cannot allocate memory" > > Regards -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/2] dax: fix data corruption due to stale mmap reads

2017-04-27 Thread Jan Kara
On Wed 26-04-17 16:52:36, Ross Zwisler wrote: > On Wed, Apr 26, 2017 at 10:52:35AM +0200, Jan Kara wrote: > > On Tue 25-04-17 16:59:36, Ross Zwisler wrote: > > > On Tue, Apr 25, 2017 at 01:10:43PM +0200, Jan Kara wrote: > > > <> > > > > Hum, but now thi

Re: [PATCH 2/2] dax: fix data corruption due to stale mmap reads

2017-04-26 Thread Jan Kara
On Tue 25-04-17 16:59:36, Ross Zwisler wrote: > On Tue, Apr 25, 2017 at 01:10:43PM +0200, Jan Kara wrote: > <> > > Hum, but now thinking more about it I have hard time figuring out why write > > vs fault cannot actually still race: > > > > CPU1 - write(2)

Re: [PATCH] fs:affs:fix sb_bread() return value

2017-04-26 Thread Jan Kara
; + return -EIO; > } > memcpy(sig, boot_bh->b_data, 4); > brelse(boot_bh); > -- > 2.1.0 > > -- Jan Kara SUSE Labs, CR

Re: kernel/rcu/tree.c:1031 rcu_irq_enter() invoked with irqs enabled!!!!

2017-04-26 Thread Jan Kara
nux/fs/read_write.c:558 > > [< inline >] SYSC_pwrite64 project/linux/fs/read_write.c:647 > > [< none >] SyS_pwrite64+0x98/0xc0 > > project/linux/fs/read_write.c:634 > > [< none >] entry_SYSCALL_64_fastpath+0x1f/0xc2 > > project/linux_2/arch/x86/entry/entry_64.S:204 > > RIP: 0033:0x7f42acd4d213 > > RSP: 002b:7ffc846e4e38 EFLAGS: 0246 ORIG_RAX: 0012 > > RAX: ffda RBX: RCX: 7f42acd4d213 > > RDX: 001e RSI: 7f42a5c9f010 RDI: 0003 > > RBP: 559bd6c46380 R08: 7f42a5c9f010 R09: 0200 > > R10: 00068082 R11: 0246 R12: 7ffc846e4f9c > > R13: 0425 R14: 0200 R15: 559bd6c46380 > > > -- Jan Kara SUSE Labs, CR

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jan Kara
On Tue 25-04-17 06:35:13, Jeff Layton wrote: > On Tue, 2017-04-25 at 10:17 +0200, Jan Kara wrote: > > On Mon 24-04-17 13:14:36, Jeff Layton wrote: > > > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > &

Re: [PATCH 2/2] dax: fix data corruption due to stale mmap reads

2017-04-25 Thread Jan Kara
calling invalidate_inode_pages2_range() in > dax_iomap_actor() for new block allocations, and by enhancing > __dax_invalidate_mapping_entry() so that it properly unmaps the DAX entry > being removed from the radix tree. > > This is based on an initial patch from Jan Kara. > > Sign

Re: [PATCH 1/2] dax: prevent invalidation of mapped DAX entries

2017-04-25 Thread Jan Kara
tially never have unmapped DAX entries to evict from the > radix tree, just remove dax_invalidate_mapping_entry(). > > Signed-off-by: Ross Zwisler > Fixes: c6dcf52c23d2 ("mm: Invalidate DAX radix tree entries only if > appropriate") > Reported-by: Jan Kara > Cc: [4.10+]

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jan Kara
On Mon 24-04-17 13:14:36, Jeff Layton wrote: > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > > This ensures that we see errors on fsync when writeback fails. > > > > > > Signed-off-by: Jeff Layton &g

Re: [PATCH v2 4/4] mm/truncate: avoid pointless cleancache_invalidate_inode() calls.

2017-04-25 Thread Jan Kara
gned-off-by: Andrey Ryabinin > Acked-by: Konrad Rzeszutek Wilk Looks sensible to me but I don't really know cleancache :). Anyway feel free to add: Acked-by: Jan Kara Honza > --- > mm/truncate.c | 12 +++-

Re: [PATCH v2 3/4] mm/truncate: bail out early from invalidate_inode_pages2_range() if mapping is empty

2017-04-25 Thread Jan Kara
y: Konrad Rzeszutek Wilk Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > mm/truncate.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/mm/truncate.c b/mm/truncate.c > index 6263aff..8f

Re: [PATCH v2 2/4] fs/block_dev: always invalidate cleancache in invalidate_bdev()

2017-04-25 Thread Jan Kara
gt; > Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache") > Signed-off-by: Andrey Ryabinin > Acked-by: Konrad Rzeszutek Wilk > Cc: Looks good. You can add: Reviewed-by: Jan Kara Honza > --- &

Re: [PATCH v2 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-25 Thread Jan Kara
ge_readpage[s]()), so they > are not affected by this bug. > > Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache") > Signed-off-by: Andrey Ryabinin > Acked-by: Konrad Rzeszutek Wilk > Cc: OK, looks good. You can add: Reviewed-by: Jan Kara

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-24 Thread Jan Kara
gt; @@ -1669,6 +1669,7 @@ static int fuse_writepage_locked(struct page *page) > err_free: > fuse_request_free(req); > err: > + mapping_set_error(page->mapping, error); > end_page_writeback(page); > return error; > } > -- > 2.9.3 > > -- Jan Kara SUSE Labs, CR

Re: [PATCH v3 09/20] 9p: set mapping error when writeback fails in launder_page

2017-04-24 Thread Jan Kara
On Mon 24-04-17 09:22:48, Jeff Layton wrote: > launder_page is just writeback under the page lock. We still need to > mark the mapping for errors there when they occur. > > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-

Re: [PATCH v3 08/20] mm: ensure that we set mapping error if writeout() fails

2017-04-24 Thread Jan Kara
On Mon 24-04-17 09:22:47, Jeff Layton wrote: > If writepage fails during a page migration, then we need to ensure that > fsync will see it by flagging the mapping. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-

Re: [PATCH v3 06/20] dax: set errors in mapping when writeback fails

2017-04-24 Thread Jan Kara
gh the mapping. After improving the changelog you can add: Reviewed-by: Jan Kara Honza > --- > fs/dax.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/dax.c b/fs/dax.c > index 85ab

Re: [PATCH v3 04/20] fs: check for writeback errors after syncing out buffers in generic_file_fsync

2017-04-24 Thread Jan Kara
That > will be sufficient for this case, and help other callers detect > these errors properly as well. > > With that, we don't need to twiddle it in ext2. > > Suggested-by: Jan Kara > Signed-off-by: Jeff Layton Looks good t

Re: [PATCH v2 29/33] uio, libnvdimm, pmem: implement cache bypass for all copy_from_iter() operations

2017-04-24 Thread Jan Kara
b_cache_pmem(). > > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Christoph Hellwig > Cc: Toshi Kani > Cc: Al Viro > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: Linus Torvalds > Signed-off-by: Dan Williams ... > +static int pmem_from_user(void *dst, const void __user *s

Re: [PATCH] fsnotify: remove a stray unlock

2017-04-24 Thread Jan Kara
rk_locked(struct fsnotify_mark *mark, > struct inode *inode, >FSNOTIFY_MARK_FLAG_ATTACHED); > list_del_init(&mark->g_list); > atomic_dec(&group->num_marks); > - spin_unlock(&mark->lock); > > fsnotify_put_mark(mark); > return ret; -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/2 linux-next] udf: use kmap_atomic for memcpy copying

2017-04-24 Thread Jan Kara
/* Restore everything back so that we don't lose data... */ > lock_page(page); > - kaddr = kmap(page); > down_write(&iinfo->i_data_sem); > + kaddr = kmap_atomic(page); > memcpy(iinfo->i_ext.i_dat

Re: [PATCH 1/2 linux-next] udf: use octal for permissions

2017-04-24 Thread Jan Kara
s/udf/namei.c > @@ -906,7 +906,7 @@ static int udf_unlink(struct inode *dir, struct dentry > *dentry) > static int udf_symlink(struct inode *dir, struct dentry *dentry, > const char *symname) > { > - struct inode *inode = udf_new_inode(dir, S_IFLNK | S_IRWXUGO); > + struct inode *inode = udf_new_inode(dir, S_IFLNK | 0777); > struct pathComponent *pc; > const char *compstart; > struct extent_position epos = {}; > -- > 2.9.3 > > -- Jan Kara SUSE Labs, CR

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
On Thu 20-04-17 16:35:10, Jan Kara wrote: > On Wed 19-04-17 13:28:36, Ross Zwisler wrote: > > On Wed, Apr 19, 2017 at 06:11:31PM +0300, Andrey Ryabinin wrote: > > > On 04/18/2017 10:38 PM, Ross Zwisler wrote: > > > > On Fri, Apr 14, 2017 at 05:07:50PM +0300, Andrey

Re: [PATCH 1/4] fs: fix data invalidation in the cleancache during direct IO

2017-04-20 Thread Jan Kara
wise? > > For DAX we only invalidate clean DAX exceptional entries so that we can keep > dirty entries around for writeback, but yes you're correct that we only do the > invalidation if nrpages > 0. And yes, it does seem a bit weird. :) Actually in this place the nrpages check is deliberate since there should only be hole pages or nothing in the invalidated range - see the comment before the if. But thinking more about it this assumption actually is not right in presence of zero PMD entries in the radix tree. So this change actually also fixes a possible bug for DAX but we should do it as a separate patch with a proper changelog. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/6] locking: Introduce range reader/writer lock

2017-04-13 Thread Jan Kara
ow long would it take for the counter to overflow if we incremented it say every nanosecond? Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 04/17] ext2: don't test/clear AS_EIO flag

2017-04-12 Thread Jan Kara
t2_error(sb, __func__, > "detected IO error when writing metadata buffers"); > -- > 2.9.3 > -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 03/17] buffer: use mapping_set_error instead of setting the flag

2017-04-12 Thread Jan Kara
On Wed 12-04-17 08:06:00, Jeff Layton wrote: > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > &g

Re: [PATCH v2 02/17] mm: fix mapping_set_error call in me_pagecache_dirty

2017-04-12 Thread Jan Kara
ayton > Reviewed-by: Ross Zwisler Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory-f

Re: [PATCH v2 01/17] mm: drop "wait" parameter from write_one_page

2017-04-12 Thread Jan Kara
igned-off-by: Jeff Layton > Reviewed-by: Ross Zwisler Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/exofs/dir.c| 2 +- > fs/ext2/dir.c | 2 +- > fs/jfs/jfs_metapage.c | 4 +

Re: [PATCH] ext4: Add statx support

2017-04-12 Thread Jan Kara
On Sun 19-03-17 12:12:37, Jan Kara wrote: > On Fri 17-03-17 14:19:22, Andreas Dilger wrote: > > On Mar 16, 2017, at 11:47 PM, Eric Biggers wrote: > > > On Thu, Mar 16, 2017 at 11:35:33AM +, David Howells wrote: > > >> + > > >> +ext4_get_i

Re: [PATCH] dax: fix radix tree insertion race

2017-04-11 Thread Jan Kara
On Mon 10-04-17 14:34:29, Ross Zwisler wrote: > On Mon, Apr 10, 2017 at 03:41:11PM +0200, Jan Kara wrote: > > On Thu 06-04-17 15:29:44, Ross Zwisler wrote: > > > While running generic/340 in my test setup I hit the following race. It > > > can > > > happen w

Re: [patch 1/3] mm: protect set_page_dirty() from ongoing truncation

2017-04-10 Thread Jan Kara
On Mon 10-04-17 15:07:58, alexander.le...@verizon.com wrote: > On Mon, Apr 10, 2017 at 02:06:38PM +0200, Jan Kara wrote: > > On Mon 10-04-17 02:22:33, alexander.le...@verizon.com wrote: > > > On Fri, Dec 05, 2014 at 09:52:44AM -0500, Johannes Weiner wrote: > > > > T

Re: [PATCH] dax: fix radix tree insertion race

2017-04-10 Thread Jan Kara
index in the PMD range. We haven't > - * inserted anything into the radix tree and have no > - * waiters to wake. > + * Our insertion of a DAX entry failed, most likely > + * because we were insert

Re: [patch 1/3] mm: protect set_page_dirty() from ongoing truncation

2017-04-10 Thread Jan Kara
0b ud2 <-- trapping instruction > 2d: 48 ba 00 00 00 00 00movabs $0xdc00,%rdx > 34: fc ff df > 37: 48 c7 04 13 00 00 00movq $0x0,(%rbx,%rdx,1) > 3e: 00 > 3f: 48 rex.W > ... > > Code starting with the faulting instruction > === >0: 0f 0b ud2 >2: 48 ba 00 00 00 00 00movabs $0xdc00,%rdx >9: fc ff df >c: 48 c7 04 13 00 00 00movq $0x0,(%rbx,%rdx,1) > 13: 00 > 14: 48 rex.W > ... > [ 19.050311] RIP: __set_page_dirty_nobuffers+0x407/0x450 RSP: > 8800c0f47318^M (??:?) > > -- > > Thanks, > Sasha -- Jan Kara SUSE Labs, CR

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-04-06 Thread Jan Kara
On Thu 06-04-17 11:12:02, NeilBrown wrote: > On Wed, Apr 05 2017, Jan Kara wrote: > >> If you want to ensure read-only files can remain cached over a crash, > >> then you would have to mark a file in some way on stable storage > >> *before* allowing any change. &

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-04-05 Thread Jan Kara
:11:48AM -0400, Jeff Layton wrote: > >> > > On Thu, 2017-03-30 at 08:47 +0200, Jan Kara wrote: > >> > > > Because if above is acceptable we could make reported i_version to > >> > > > be a sum > >> > > > of "superblock crash co

Re: [PATCH 1/5] locking: Introduce range reader/writer lock

2017-04-03 Thread Jan Kara
s usually stack allocated. Or just a plain sequence counter of the lock operations? There are ways how we could implement the functionality without the counter and although asymptotically they will be the same, they are more complex code-wise so I think the counter is the best solution. Hoza -- Jan Kara SUSE Labs, CR

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-04-03 Thread Jan Kara
On Sun 02-04-17 09:05:26, Dave Chinner wrote: > On Thu, Mar 30, 2017 at 12:12:31PM -0400, J. Bruce Fields wrote: > > On Thu, Mar 30, 2017 at 07:11:48AM -0400, Jeff Layton wrote: > > > On Thu, 2017-03-30 at 08:47 +0200, Jan Kara wrote: > > > > Because if above is acc

Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage

2017-04-03 Thread Jan Kara
see as viable to reduce amount of messages as it is neverending fight and always someone will be unhappy. As a result currently some machines are not able to boot due to printk traffic and there are other nasty effects from CPUs getting stuck printing messages to serial console (and this really bothers people as is proved by the fact that about every 6 months someone comes with a hack to printk to fix the particular lockup he is hitting). This patch set gives up part of the printk() reliability for bounded latency (at least unless we detect we are really in trouble) which is IMHO a good trade-off for lots of users (and others can just turn this feature off). Honza -- Jan Kara SUSE Labs, CR

<    7   8   9   10   11   12   13   14   15   16   >