Hi Kuai!
On Thu 04-01-24 20:19:05, Yu Kuai wrote:
> 在 2024/01/04 19:06, Jan Kara 写道:
> > On Thu 21-12-23 16:56:57, Yu Kuai wrote:
> > > From: Yu Kuai
> > >
> > > Avoid to access bd_inode directly, prepare to remove bd_inode from
> > > bloc
4), and prepare to
> prevent calling mapping_gfp_constraint() directly on bd_inode->i_mapping
> in ext4.
>
> Signed-off-by: Yu Kuai
I'm not enthusiastic about this but I guess it is as good as it gets
without larger cleanups in thi
On Thu 21-12-23 16:58:46, Yu Kuai wrote:
> From: Yu Kuai
>
> Avoid to access bd_inode directly, prepare to remove bd_inode from
> block_device.
>
> Signed-off-by: Yu Kuai
Looks good to me. Feel free to add:
Reviewed-by: Jan Kara
But note there are changes pe
0409badb017..c9206351b485 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -224,8 +224,10 @@ enum erofs_kmap_type {
>
> struct erofs_buf {
> struct inode *inode;
> + struct block_device *bdev;
> struct page *page;
> void *base;
> + u8 blkszbits;
> enum erofs_kmap_type kmap_type;
> };
> #define __EROFS_BUF_INITIALIZER ((struct erofs_buf){ .page = NULL })
> --
> 2.39.2
>
--
Jan Kara
SUSE Labs, CR
developers know and maybe it is just a
cargo cult. And it is not like this would be the first occurence of this
anti-pattern in btrfs - see e.g. device_list_add(), add_missing_dev(),
btrfs_destroy_delalloc_inodes() (here the wrapping around
invalidate_inode_pages2() looks really weird), and many others...
Honza
--
Jan Kara
SUSE Labs, CR
n we are working with the folios it is rather
natural to use their mapping for dirty balancing?
Honza
--
Jan Kara
SUSE Labs, CR
lean dirty pages using the ->launder_folio method). So I think you'll
need helper like invalidate_bdev2() for this.
Honza
--
Jan Kara
SUSE Labs, CR
n
on doing ;)
Honza
--
Jan Kara
SUSE Labs, CR
gfp, true);
> +}
> +EXPORT_SYMBOL(__bread_gfp2);
__bread_gfp2() is not a great name, why not just using bread_gfp()
directly? I'm not a huge fan of boolean arguments but three different flags
arguments would be too much for my taste ;) so I guess I can live with
that.
Honza
--
Jan Kara
SUSE Labs, CR
ree to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/ext4/ext4.h| 13 -
> fs/ext4/inode.c | 8
> fs/ext4/super.c | 45 ++---
> fs/ext4/syml
reed, this should not be needed anymore. We'll see whether this is true
also in practice :). Feel free to add:
Reviewed-by: Jan Kara
Honza
--
Jan Kara
SUSE Labs, CR
On Mon 11-12-23 22:08:39, Yu Kuai wrote:
> From: Yu Kuai
>
> Avoid to access bd_inode directly, prepare to remove bd_inode from
> block_devcie.
^^^ device
> Signed-off-by: Yu Kuai
Looks good. Feel free to add:
Review
Honza
--
Jan Kara
SUSE Labs, CR
On Wed 27-09-23 18:21:19, Christian Brauner wrote:
> On Wed, 27 Sep 2023 11:34:07 +0200, Jan Kara wrote:
> > Create struct bdev_handle that contains all parameters that need to be
> > passed to blkdev_put() and provide bdev_open_* functions that return
> > this structure
Convert erofs to use bdev_open_by_path() and pass the handle around.
CC: Gao Xiang
CC: Chao Yu
CC: linux-erofs@lists.ozlabs.org
Acked-by: Christoph Hellwig
Acked-by: Gao Xiang
Reviewed-by: Christian Brauner
Signed-off-by: Jan Kara
---
fs/erofs/data.c | 4 ++--
fs/erofs/internal.h | 2
On Wed 20-09-23 10:12:03, Jeff Layton wrote:
> On Wed, 2023-09-20 at 14:48 +0200, Jan Kara wrote:
> > On Wed 20-09-23 06:35:18, Jeff Layton wrote:
> > > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote:
> > > > If I were a sysadmin, I'd rather opt for something like
for
multigrain timestamps") will be needed anyway but there's no problem in
reintroducing it in the new solution. I've checked the branch and the
reverts look good to me. Feel free to add:
Acked-by: Jan Kara
Honza
--
Jan Kara
SUSE Labs, CR
On Wed 20-09-23 06:35:18, Jeff Layton wrote:
> On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote:
> > If I were a sysadmin, I'd rather opt for something like
> > finegrained timestamps + lazytime (if I needed the finegrained timestamps
> > functionality). That should
ine SB_MGTIMEBIT(5) /* Use multi-grain timestamps */
> #define SB_MANDLOCK BIT(6) /* Allow mandatory locks on an FS */
> #define SB_DIRSYNC BIT(7) /* Directory modifications are
> synchronous */
> #define SB_NOATIME BIT(10) /* Do not update access ti
stant, and that
> > > isn't necessarily the case now.
> >
> > This is only of secondary importance, because the scenario by Jan Kara
> > shows a much more fundamental breakage:
> >
> > > > The ultimate problem is that a sequence like:
> > > >
&g
t(f1)
can result in f1 timestamp to be (slightly) lower than the final f2
timestamp because the second write to f1 didn't bother updating the
timestamp. That can indeed be a bit confusing to programs if they compare
timestamps between two files. Jeff?
On Fri 25-08-23 15:32:47, Christian Brauner wrote:
> On Wed, Aug 23, 2023 at 12:48:11PM +0200, Jan Kara wrote:
> > Hello,
> >
> > this is a v3 of the patch series which implements the idea of
> > blkdev_get_by_*()
> > calls returning bdev_handle which
On Fri 25-08-23 02:58:43, Al Viro wrote:
> On Fri, Aug 11, 2023 at 01:04:31PM +0200, Jan Kara wrote:
> > Hello,
> >
> > this is a v2 of the patch series which implements the idea of
> > blkdev_get_by_*()
> > calls returning bdev_handle which is then passed to
Hello,
this is a v3 of the patch series which implements the idea of blkdev_get_by_*()
calls returning bdev_handle which is then passed to blkdev_put() [1]. This
makes the get and put calls for bdevs more obviously matching and allows us to
propagate context from get to put without having to
Convert erofs to use bdev_open_by_path() and pass the handle around.
CC: Gao Xiang
CC: Chao Yu
CC: linux-erofs@lists.ozlabs.org
Acked-by: Christoph Hellwig
Acked-by: Gao Xiang
Signed-off-by: Jan Kara
---
fs/erofs/data.c | 4 ++--
fs/erofs/internal.h | 2 +-
fs/erofs/super.c| 20
Convert erofs to use bdev_open_by_path() and pass the handle around.
CC: Gao Xiang
CC: Chao Yu
CC: linux-erofs@lists.ozlabs.org
Acked-by: Gao Xiang
Signed-off-by: Jan Kara
---
fs/erofs/data.c | 4 ++--
fs/erofs/internal.h | 2 +-
fs/erofs/super.c| 20 ++--
3 files
Hello,
this is a v2 of the patch series which implements the idea of blkdev_get_by_*()
calls returning bdev_handle which is then passed to blkdev_put() [1]. This
makes the get and put calls for bdevs more obviously matching and allows us to
propagate context from get to put without having to
On Wed 09-08-23 09:06:34, Christian Brauner wrote:
> On Tue, Aug 08, 2023 at 11:37:01AM +0200, Jan Kara wrote:
> > On Mon 07-08-23 15:38:37, Jeff Layton wrote:
> > > In later patches, we're going to drop the "now" parameter from the
> > > update_time operati
atch eliminates
> update_time_for_write, which goes to great pains to avoid in-memory
> stores. Just have it overwrite the timestamps unconditionally.
>
> Signed-off-by: Jeff Layton
> Acked-by: David Sterba
Looks good to me. Feel free
ms that don't set this flag will continue to use
> coarse-grained timestamps.
>
> Later patches will convert individual filesystems to use the new
> infrastructure.
>
> Signed-off-by: Jeff Layton
Looks good to me. Feel free to add:
Reviewed-by:
(flags & S_ATIME)
> - inode->i_atime = *now;
> + inode->i_atime = now;
>
> xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
> xfs_trans_log_inode(tp, ip, log_flags);
Otherwise the patch looks good to me so feel free to add:
Reviewed-by: Jan Kara
Honza
--
Jan Kara
SUSE Labs, CR
calling
__mark_inode_dirty(). Otherwise you could release budget for inode update
you really need...
> if (release)
> ubifs_release_budget(c, );
Honza
--
Jan Kara
SUSE Labs, CR
Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/fat/misc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fat/misc.c b/fs/fat/misc
d-off-by: Jeff Layton
Nice cleanup! Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/btrfs/inode.c | 9 +
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs
hat and rework the callers to expect it.
>
> Signed-off-by: Jeff Layton
Looks good to me. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/gfs2/inode.c | 3 +-
> fs/inode.c | 84
> +++
On Mon 07-08-23 15:38:32, Jeff Layton wrote:
> An inode with no superblock? Unpossible!
>
> Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/inode.c | 6 --
&g
>
> Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/ext4/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/super.c b/
; Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> mm/shmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 654d9
32768 /* FS will handle d_move()
> during rename() internally. */
> int (*init_fs_context)(struct fs_context *);
> const struct fs_parameter_spec *parameters;
> @@ -2284,6 +2313,17 @@ struct file_system_type {
>
> #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-&
ng of
> STATX_CHANGE_COOKIE into generic_fillattr.
>
> Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-by: Jan Kara
Honza
> ---
> fs/9p/vfs_inode.c | 4 ++--
> fs/9p/vfs_inode_dotl.c | 4 ++--
> fs/
On Fri 07-07-23 04:28:41, Christoph Hellwig wrote:
> On Thu, Jul 06, 2023 at 06:14:33PM +0200, Jan Kara wrote:
> > > struct bdev_handle *bdev_open_by_path(dev_t dev, blk_mode_t mode,
> > > void *holder, const struct blk_holder_ops *hops);
> > > void b
On Wed 05-07-23 14:58:12, Jeff Layton wrote:
> Now that everything in-tree is converted to use the accessor functions,
> rename the i_ctime field in the inode to discourage direct access.
>
> Signed-off-by: Jeff Layton
Looks good. Feel free to add:
Reviewed-
struct inode *, struct dentry *);
> extern int simple_unlink(struct inode *, struct dentry *);
> extern int simple_rmdir(struct inode *, struct dentry *);
> +void simple_rename_timestamp(struct inode *old_dir, struct dentry
> *old_dentry,
> + struct inode *new_dir, struct dentry *new_dentry);
> extern int simple_rename_exchange(struct inode *old_dir, struct dentry
> *old_dentry,
> struct inode *new_dir, struct dentry
> *new_dentry);
> extern int simple_rename(struct mnt_idmap *, struct inode *,
> --
> 2.41.0
>
--
Jan Kara
SUSE Labs, CR
+ inode->i_atime.tv_sec = inode_get_ctime(inode).tv_sec;
> + inode->i_mtime.tv_nsec = inode_get_ctime(inode).tv_nsec;
> + inode->i_atime.tv_nsec = inode_get_ctime(inode).tv_nsec;
Isn't this just longer way to write:
inode->i_atime = inode->i_mtime = inode_get_ctime(inode);
?
Honza
--
Jan Kara
SUSE Labs, CR
On Tue 04-07-23 07:06:26, Bart Van Assche wrote:
> On 7/4/23 05:21, Jan Kara wrote:
> > +struct bdev_handle {
> > + struct block_device *bdev;
> > + void *holder;
> > +};
>
> Please explain in the patch description why a holder pointer is introduced
> in s
On Tue 04-07-23 10:28:36, Keith Busch wrote:
> On Tue, Jul 04, 2023 at 02:21:28PM +0200, Jan Kara wrote:
> > +struct bdev_handle *blkdev_get_handle_by_dev(dev_t dev, blk_mode_t mode,
> > + void *holder, const struct blk_holder_ops *hops)
> > +{
> > +
On Tue 04-07-23 13:43:51, Matthew Wilcox wrote:
> On Tue, Jul 04, 2023 at 02:21:28PM +0200, Jan Kara wrote:
> > +struct bdev_handle *blkdev_get_handle_by_dev(dev_t dev, blk_mode_t mode,
> > + void *holder, const struct blk_holder_ops *hops)
> > +{
> > +
Convert erofs to use blkdev_get_handle_by_path() and pass the handle
around.
CC: Gao Xiang
CC: Chao Yu
CC: linux-erofs@lists.ozlabs.org
Signed-off-by: Jan Kara
---
fs/erofs/data.c | 4 ++--
fs/erofs/internal.h | 2 +-
fs/erofs/super.c| 20 ++--
3 files changed, 13
eiserfs-de...@vger.kernel.org
CC: Sergey Senozhatsky
CC: Song Liu
CC: Sven Schnelle
CC: target-de...@vger.kernel.org
CC: Ted Tso
CC: Trond Myklebust
CC: xen-de...@lists.xenproject.org
Signed-off-by: Jan Kara
---
block/bdev.c | 47 ++
include/linu
C: Minchan Kim
CC: ocfs2-de...@oss.oracle.com
CC: reiserfs-de...@vger.kernel.org
CC: Sergey Senozhatsky
CC: Song Liu
CC: Sven Schnelle
CC: target-de...@vger.kernel.org
CC: Ted Tso
CC: Trond Myklebust
CC: xen-de...@lists.xenproject.org
Signed-off-by: Jan Kara
---
bl
Hello,
this patch series implements the idea of blkdev_get_by_*() calls returning
bdev_handle which is then passed to blkdev_put() [1]. This makes the get
and put calls for bdevs more obviously matching and allows us to propagate
context from get to put without having to modify all the users
do that safely though, we'll need to eradicate raw
> accesses of the inode->i_ctime field from the kernel.
>
> Add new accessor functions for the ctime that we can use to replace them.
>
> Signed-off-by: Jeff Layton
Looks good to me. Feel fr
h of complexity. That
being said keeping compressed data cached somewhere else than in the page
cache may certainly me worth it and then just filling page cache on demand
from this data...
Honza
--
Jan Kara
SUSE Labs, CR
%u", yacl->num_cleaned);
> break;
> case 3:
These scnprintf() changes (and there are more in the patch) probably
shouldn't be here... Otherwise the patch still looks good to me :).
Honza
--
Jan Kara
SUSE Labs, CR
> + int (*get)(const struct xattr_handler *handler,
> +struct xattr_gs_flags);
> + int (*set)(const struct xattr_handler *handler,
> +struct xattr_gs_flags);
The prototype here is really "struct xattr_gs_flags *args", isn't it?
Othe
of the
> flags option for xattr functions, and a replacement of _vfs_getxattr
> with __vfs_getxattr(...XATTR_NOSECURITY).
>
> Signed-off-by: Mark Salyzyn
> Cc: Stephen Smalley
> Cc: linux-ker...@vger.kernel.org
> Cc: kernel-t...@android.com
> Cc: linux-security-mod...@vger.ke
On Wed 14-08-19 07:54:16, Mark Salyzyn wrote:
> On 8/14/19 4:00 AM, Jan Kara wrote:
> > On Tue 13-08-19 07:55:06, Mark Salyzyn wrote:
> > ...
> > > diff --git a/fs/xattr.c b/fs/xattr.c
> > > index 90dd78f0eb27..71f887518d6f 100644
> > &g
ing to export XATTR_NOSECURITY definition to userspace when
that is kernel-internal flag. I'd just define it in include/linux/xattr.h
somewhere from the top of flags space (like 0x4000).
Otherwise the patch looks OK to me (cannot really comment on the security
module aspect of this whole thing though).
Honza
--
Jan Kara
SUSE Labs, CR
58 matches
Mail list logo