linux-next: manual merge of the vfs tree with the f2fs tree

2021-04-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/namei.c

between commit:

  5f029c045c94 ("f2fs: clean up build warnings")

from the f2fs tree and commit:

  80e5d1ff5d5f ("useful constants: struct qstr for ".."")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/namei.c
index 405d85dbf9f1,377c6b161b23..
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@@ -416,10 -416,8 +416,9 @@@ out
  
  struct dentry *f2fs_get_parent(struct dentry *child)
  {
-   struct qstr dotdot = QSTR_INIT("..", 2);
struct page *page;
-   unsigned long ino = f2fs_inode_by_name(d_inode(child), &dotdot, &page);
+   unsigned long ino = f2fs_inode_by_name(d_inode(child), &dotdot_name, 
&page);
 +
if (!ino) {
if (IS_ERR(page))
return ERR_CAST(page);


pgpXEbsccnEan.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with the f2fs tree

2018-10-02 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/super.c

between commit:

  f80f781514ef ("f2fs: checkpoint disabling")

from the f2fs tree and commit:

  307c6e5241b4 ("vfs: Require specification of size of mount data for internal 
mounts")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/super.c
index 952a67b3184a,89970dd81b0e..
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@@ -1449,53 -1419,8 +1449,54 @@@ static void default_options(struct f2fs
  #ifdef CONFIG_QUOTA
  static int f2fs_enable_quotas(struct super_block *sb);
  #endif
 +
 +static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
 +{
 +  struct cp_control cpc;
 +  int err;
 +
 +  sbi->sb->s_flags |= SB_ACTIVE;
 +
 +  mutex_lock(&sbi->gc_mutex);
 +  for (; dirty_segments(sbi) > 2 * NR_CURSEG_TYPE;) {
 +  err = f2fs_gc(sbi, true, false, NULL_SEGNO);
 +  if (err == -ENODATA)
 +  break;
 +  if (err && err != -EAGAIN) {
 +  mutex_unlock(&sbi->gc_mutex);
 +  return err;
 +  }
 +  }
 +  mutex_unlock(&sbi->gc_mutex);
 +
 +  err = sync_filesystem(sbi->sb);
 +  if (err)
 +  return err;
 +
 +  mutex_lock(&sbi->gc_mutex);
 +  cpc.reason = CP_PAUSE;
 +  set_sbi_flag(sbi, SBI_CP_DISABLED);
 +  f2fs_write_checkpoint(sbi, &cpc);
 +
 +  sbi->unusable_block_count = 0;
 +  mutex_unlock(&sbi->gc_mutex);
 +  return 0;
 +}
 +
 +static void f2fs_enable_checkpoint(struct f2fs_sb_info *sbi)
 +{
 +  mutex_lock(&sbi->gc_mutex);
 +  f2fs_dirty_to_prefree(sbi);
 +
 +  clear_sbi_flag(sbi, SBI_CP_DISABLED);
 +  set_sbi_flag(sbi, SBI_IS_DIRTY);
 +  mutex_unlock(&sbi->gc_mutex);
 +
 +  f2fs_sync_fs(sbi->sb, 1);
 +}
 +
- static int f2fs_remount(struct super_block *sb, int *flags, char *data)
+ static int f2fs_remount(struct super_block *sb, int *flags,
+   char *data, size_t data_size)
  {
struct f2fs_sb_info *sbi = F2FS_SB(sb);
struct f2fs_mount_info org_mount_opt;


pgpcyPrVQL3on.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with the f2fs tree

2017-11-08 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/super.c

between commit:

  ea6767337f86 ("f2fs: support quota sys files")

from the f2fs tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/super.c
index a6c5dd450002,c2f30c6034f2..
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@@ -1255,26 -1199,19 +1255,26 @@@ static int f2fs_remount(struct super_bl
 * Previous and new state of filesystem is RO,
 * so skip checking GC and FLUSH_MERGE conditions.
 */
-   if (f2fs_readonly(sb) && (*flags & MS_RDONLY))
+   if (f2fs_readonly(sb) && (*flags & SB_RDONLY))
goto skip;
  
 +#ifdef CONFIG_QUOTA
-   if (!f2fs_readonly(sb) && (*flags & MS_RDONLY)) {
+   if (!f2fs_readonly(sb) && (*flags & SB_RDONLY)) {
err = dquot_suspend(sb, -1);
if (err < 0)
goto restore_opts;
} else {
/* dquot_resume needs RW */
-   sb->s_flags &= ~MS_RDONLY;
+   sb->s_flags &= ~SB_RDONLY;
 -  dquot_resume(sb, -1);
 +  if (sb_any_quota_suspended(sb)) {
 +  dquot_resume(sb, -1);
 +  } else if (f2fs_sb_has_quota_ino(sb)) {
 +  err = f2fs_enable_quotas(sb);
 +  if (err)
 +  goto restore_opts;
 +  }
}
 -
 +#endif
/* disallow enable/disable extent_cache dynamically */
if (no_extent_cache == !!test_opt(sbi, EXTENT_CACHE)) {
err = -EINVAL;


linux-next: manual merge of the vfs tree with the f2fs tree

2017-11-08 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/checkpoint.c

between commits:

  1f227a3e215d ("f2fs: stop all the operations by cp_error flag")
  ea6767337f86 ("f2fs: support quota sys files")

from the f2fs tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/checkpoint.c
index 98777c1ae70c,608a69fc199e..
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@@ -629,10 -601,9 +629,10 @@@ int recover_orphan_inodes(struct f2fs_s
  
  #ifdef CONFIG_QUOTA
/* Needed for iput() to work correctly and not trash data */
-   sbi->sb->s_flags |= MS_ACTIVE;
+   sbi->sb->s_flags |= SB_ACTIVE;
 +
/* Turn on quotas so that they are updated correctly */
-   quota_enabled = f2fs_enable_quota_files(sbi, s_flags & MS_RDONLY);
 -  f2fs_enable_quota_files(sbi);
++  quota_enabled = f2fs_enable_quota_files(sbi, s_flags & SB_RDONLY);
  #endif
  
start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi);
@@@ -660,10 -631,9 +660,10 @@@
  out:
  #ifdef CONFIG_QUOTA
/* Turn quotas off */
 -  f2fs_quota_off_umount(sbi->sb);
 +  if (quota_enabled)
 +  f2fs_quota_off_umount(sbi->sb);
  #endif
-   sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */
+   sbi->sb->s_flags = s_flags; /* Restore SB_RDONLY status */
  
return err;
  }


Re: linux-next: manual merge of the vfs tree with the f2fs tree

2017-02-27 Thread David Howells
Stephen Rothwell  wrote:

> ++int f2fs_getattr(const struct path *path, struct kstat *stat, u32 
> request_mask,
> ++ unsigned int query_flags);

This looks correct.  I see someone replaced all the function declarations with
ones with named arguments, hence the collision.

David


linux-next: manual merge of the vfs tree with the f2fs tree

2017-02-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/f2fs.h

between commit:

  cac5a3d8f517 ("f2fs: fix 446 coding style warnings in f2fs.h")

from the f2fs tree and commit:

  caffc373c573 ("statx: Add a system call to make enhanced file info available")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/f2fs.h
index d1483136fed6,db1f5f6a0d04..
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@@ -2036,17 -1962,16 +2036,17 @@@ static inline void *f2fs_kvzalloc(size_
  /*
   * file.c
   */
 -int f2fs_sync_file(struct file *, loff_t, loff_t, int);
 -void truncate_data_blocks(struct dnode_of_data *);
 -int truncate_blocks(struct inode *, u64, bool);
 -int f2fs_truncate(struct inode *);
 -int f2fs_getattr(const struct path *, struct kstat *, u32, unsigned int);
 -int f2fs_setattr(struct dentry *, struct iattr *);
 -int truncate_hole(struct inode *, pgoff_t, pgoff_t);
 -int truncate_data_blocks_range(struct dnode_of_data *, int);
 -long f2fs_ioctl(struct file *, unsigned int, unsigned long);
 -long f2fs_compat_ioctl(struct file *, unsigned int, unsigned long);
 +int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync);
 +void truncate_data_blocks(struct dnode_of_data *dn);
 +int truncate_blocks(struct inode *inode, u64 from, bool lock);
 +int f2fs_truncate(struct inode *inode);
- int f2fs_getattr(struct vfsmount *mnt, struct dentry *dentry,
-   struct kstat *stat);
++int f2fs_getattr(const struct path *path, struct kstat *stat, u32 
request_mask,
++   unsigned int query_flags);
 +int f2fs_setattr(struct dentry *dentry, struct iattr *attr);
 +int truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end);
 +int truncate_data_blocks_range(struct dnode_of_data *dn, int count);
 +long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
 +long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long 
arg);
  
  /*
   * inode.c


linux-next: manual merge of the vfs tree with the f2fs tree

2016-07-24 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got conflicts in:

  fs/f2fs/dir.c
  fs/f2fs/f2fs.h

between commit:

  91246c21b859 ("f2fs: fix to report error number of f2fs_find_entry")

from the f2fs tree and commit:

  14bffd7c398a ("qstr: constify instances in f2fs")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/dir.c
index a485f68a76b1,3b095a35aa47..
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@@ -267,13 -259,25 +267,13 @@@ out
  
  struct f2fs_dir_entry *f2fs_parent_dir(struct inode *dir, struct page **p)
  {
 -  struct page *page;
 -  struct f2fs_dir_entry *de;
 -  struct f2fs_dentry_block *dentry_blk;
 -
 -  if (f2fs_has_inline_dentry(dir))
 -  return f2fs_parent_inline_dir(dir, p);
 -
 -  page = get_lock_data_page(dir, 0, false);
 -  if (IS_ERR(page))
 -  return NULL;
 +  struct qstr dotdot = QSTR_INIT("..", 2);
  
 -  dentry_blk = kmap(page);
 -  de = &dentry_blk->dentry[1];
 -  *p = page;
 -  unlock_page(page);
 -  return de;
 +  return f2fs_find_entry(dir, &dotdot, p);
  }
  
- ino_t f2fs_inode_by_name(struct inode *dir, struct qstr *qstr,
 -ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr)
++ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr,
 +  struct page **page)
  {
ino_t res = 0;
struct f2fs_dir_entry *de;
diff --cc fs/f2fs/f2fs.h
index 30981094dff8,fd0a156d7561..
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@@ -1912,11 -1804,11 +1912,11 @@@ struct page *init_inode_metadata(struc
const struct qstr *, struct page *);
  void update_parent_metadata(struct inode *, struct inode *, unsigned int);
  int room_for_filename(const void *, int, int);
 -void f2fs_drop_nlink(struct inode *, struct inode *, struct page *);
 +void f2fs_drop_nlink(struct inode *, struct inode *);
- struct f2fs_dir_entry *f2fs_find_entry(struct inode *, struct qstr *,
+ struct f2fs_dir_entry *f2fs_find_entry(struct inode *, const struct qstr *,
struct page **);
  struct f2fs_dir_entry *f2fs_parent_dir(struct inode *, struct page **);
- ino_t f2fs_inode_by_name(struct inode *, struct qstr *, struct page **);
 -ino_t f2fs_inode_by_name(struct inode *, const struct qstr *);
++ino_t f2fs_inode_by_name(struct inode *, const struct qstr *, struct page **);
  void f2fs_set_link(struct inode *, struct f2fs_dir_entry *,
struct page *, struct inode *);
  int update_dent_inode(struct inode *, struct inode *, const struct qstr *);


linux-next: manual merge of the vfs tree with the f2fs tree

2016-05-02 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/f2fs/data.c

between commit:

  6bfc49197eba ("f2fs: issue cache flush on direct IO")

from the f2fs tree and commit:

  c8b8e32d700f ("direct-io: eliminate the offset argument to ->direct_IO")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/f2fs/data.c
index 38ce5d6f8583,a4c5da5bfe1e..
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@@ -1687,13 -1672,9 +1687,13 @@@ static ssize_t f2fs_direct_IO(struct ki
  
trace_f2fs_direct_IO_enter(inode, offset, count, iov_iter_rw(iter));
  
-   err = blockdev_direct_IO(iocb, inode, iter, offset, get_data_block_dio);
+   err = blockdev_direct_IO(iocb, inode, iter, get_data_block_dio);
 -  if (err < 0 && iov_iter_rw(iter) == WRITE)
 -  f2fs_write_failed(mapping, offset + count);
 +  if (iov_iter_rw(iter) == WRITE) {
 +  if (err > 0)
 +  set_inode_flag(F2FS_I(inode), FI_UPDATE_WRITE);
 +  else if (err < 0)
 +  f2fs_write_failed(mapping, offset + count);
 +  }
  
trace_f2fs_direct_IO_exit(inode, offset, count, iov_iter_rw(iter), err);
  


linux-next: manual merge of the vfs tree with the f2fs tree

2015-05-06 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/f2fs/namei.c between commit 04002bddf33a ("f2fs: fix wrong error hanlder in 
f2fs_follow_link") from the f2fs tree and commits
32a09a012611 ("new ->follow_link() and ->put_link() calling
conventions") and e1a9e9dd8594 ("don't pass nameidata to
->follow_link()") from the vfs tree.

I fixed it up (the vfs tree changes are a superset of the f2fs tree
changes, so I just used them) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpEptPQLKICm.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with the f2fs tree

2015-04-12 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/f2fs/f2fs.h between commit 510022a85839 ("f2fs: add F2FS_INLINE_DOTS
to recover missing dot dentries") from the f2fs tree and commit
5dd3dc06371a ("VFS: normal filesystems (and lustre): d_inode()
annotations") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/f2fs/f2fs.h
index 053361ace0ec,02e4ab3e7d4d..
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@@ -1481,8 -1391,8 +1481,8 @@@ bool f2fs_empty_dir(struct inode *)
  
  static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode)
  {
-   return __f2fs_add_link(dentry->d_parent->d_inode, &dentry->d_name,
+   return __f2fs_add_link(d_inode(dentry->d_parent), &dentry->d_name,
 -  inode);
 +  inode, inode->i_ino, inode->i_mode);
  }
  
  /*


pgpk42cV00IZY.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with the f2fs tree

2014-06-09 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/f2fs/data.c between commit b6fe5873cb42 ("f2fs: fix to recover data
written by dio") from the f2fs tree and commits d8d3d94b80aa ("pass
iov_iter to ->direct_IO()") and 31b140398ce5 ("switch
{__,}blockdev_direct_IO() to iov_iter") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/f2fs/data.c
index c1fb6dd10911,1d2e7e9624d2..
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@@ -1044,14 -1018,11 +1043,14 @@@ static ssize_t f2fs_direct_IO(int rw, s
if (f2fs_has_inline_data(inode))
return 0;
  
-   if (check_direct_IO(inode, rw, iov, offset, nr_segs))
+   if (check_direct_IO(inode, rw, iter, offset))
return 0;
  
 +  /* clear fsync mark to recover these blocks */
 +  fsync_mark_clear(F2FS_SB(inode->i_sb), inode->i_ino);
 +
-   return blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
-   get_data_block);
+   return blockdev_direct_IO(rw, iocb, inode, iter, offset,
+ get_data_block);
  }
  
  static void f2fs_invalidate_data_page(struct page *page, unsigned int offset,


signature.asc
Description: PGP signature


linux-next: manual merge of the vfs tree with the f2fs tree

2014-04-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/f2fs/file.c
between commit adeb670f1fee ("f2fs: introduce f2fs_seek_block to support
SEEK_{DATA, HOLE} in llseek") from the f2fs tree and commits 8eb02141b8a6
("switch simple generic_file_aio_read() users to ->read_iter()") and
e6552301fb08 ("write_iter variants of {__,}generic_file_aio_write()")
from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/f2fs/file.c
index b9f4fbf5c07e,e4ba4b93f96a..
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@@ -802,11 -678,11 +802,11 @@@ long f2fs_compat_ioctl(struct file *fil
  #endif
  
  const struct file_operations f2fs_file_operations = {
 -  .llseek = generic_file_llseek,
 +  .llseek = f2fs_llseek,
-   .read   = do_sync_read,
-   .write  = do_sync_write,
-   .aio_read   = generic_file_aio_read,
-   .aio_write  = generic_file_aio_write,
+   .read   = new_sync_read,
+   .write  = new_sync_write,
+   .read_iter  = generic_file_read_iter,
+   .write_iter = generic_file_write_iter,
.open   = generic_file_open,
.mmap   = f2fs_file_mmap,
.fsync  = f2fs_sync_file,


pgpZCXPzu3aeS.pgp
Description: PGP signature