On Tue, Sep 17, 2024 at 08:44:29AM +0100, Al Viro wrote:
> Anyway, I'm half-asleep at the moment and I'd rather leave writing these
> rules up until tomorrow. Sorry...
[Below are the bits of my notes related to d_name and d_parent,
with most of the unprintable parts thrown
On Tue, Sep 17, 2024 at 08:31:49AM +0100, Al Viro wrote:
> > After d_splice_alias() and d_add(), rename() could change d_name. So
> > either we take d_lock or with rcu_read_lock() to take a snapshot of
> > d_name in the RCU walk path. That is my overall understanding.
On Tue, Sep 17, 2024 at 03:14:58PM +0800, Gao Xiang wrote:
> > Sorry for my ignorance.
> > I mean i just borrowed the code from the fs/erofs/namei.c and i directly
> > translated that into Rust code. That might be a problem that also
> > exists in original working C code.
>
> As for EROFS (an imm
On Mon, Sep 16, 2024 at 09:56:29PM +0800, Yiyang Wu wrote:
> +/// Lookup function for dentry-inode lookup replacement.
> +#[no_mangle]
> +pub unsafe extern "C" fn erofs_lookup_rust(
> +k_inode: NonNull,
> +dentry: NonNull,
> +_flags: c_uint,
> +) -> *mut c_void {
> +// SAFETY: We ar
On Thu, Mar 07, 2024 at 07:21:12AM +, Al Viro wrote:
> On Thu, Mar 07, 2024 at 03:06:49PM +0800, Baokun Li wrote:
> > > > +int erofs_anon_register_fs(void)
> > > > +{
> > > > + return register_filesystem(&erofs_anon_fs_type);
> > > >
On Thu, Mar 07, 2024 at 03:06:49PM +0800, Baokun Li wrote:
> > > +int erofs_anon_register_fs(void)
> > > +{
> > > + return register_filesystem(&erofs_anon_fs_type);
> > > +}
> > What for? The only thing it gives you is an ability to look it up by
> > name. Which is completely pointless, IMO,
> Th
On Thu, Mar 07, 2024 at 10:44:59AM +0800, Baokun Li wrote:
> +static int erofs_anon_init_fs_context(struct fs_context *fc)
> +{
> + fc->ops = &erofs_anon_context_ops;
> + return 0;
> +}
ITYM
struct pseudo_fs_context *ctx = init_pseudo(fc, EROFS_SUPER_MAGIC);
return ctx ?
On Mon, Nov 27, 2023 at 02:21:00PM +0800, Yu Kuai wrote:
> From: Yu Kuai
>
> Changes in v2:
> - split different portions into different patches, as greg k-h
> suggested.
> - use container_of() instead of "bdev + 1" to get the address of
> bd_inode in the new helper, as grep k-h suggested.
Yo
On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote:
> + * POSIX mandates that the old and new parent directories have their ctime
> and
> + * mtime updated, and that inodes of @old_dentry and @new_dentry (if any),
> have
> + * their ctime updated.
APPLICATION USAGE
Some implementations
On Tue, Aug 29, 2023 at 08:43:31PM -0400, Jeff Layton wrote:
> On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote:
> > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote:
> > > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote:
> > > > On Tue, Jul 25, 2023 at
On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote:
> On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote:
> > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote:
> > > generic_fillattr just fills in the entire stat struct indiscriminately
> > > today,
On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote:
> generic_fillattr just fills in the entire stat struct indiscriminately
> today, copying data from the inode. There is at least one attribute
> (STATX_CHANGE_COOKIE) that can have side effects when it is reported,
> and we're looking at
On Fri, Aug 25, 2023 at 03:47:56PM +0200, Jan Kara wrote:
> I can see the appeal of not having to introduce the new bdev_handle type
> and just using struct file which unifies in-kernel and userspace block
> device opens. But I can see downsides too - the last fput() happening from
> task work mak
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 blkdev_put() [1]. This
> makes the get and put calls for bdevs more obviously matching and
On Fri, Mar 10, 2023 at 11:51:21AM +0800, Yangtao Li wrote:
> Hi AI,
>
> > Umm... What's the branchpoint for that series?
> > Not the mainline - there we have i_blocksize() open-coded...
>
> Sorry, I'm based on the latest branch of the erofs repository.
>
> https://git.kernel.org/pub/scm/linux/
On Fri, Mar 10, 2023 at 03:19:40AM +, Al Viro wrote:
> On Thu, Mar 09, 2023 at 11:21:25PM +0800, Yangtao Li wrote:
> > Use i_blockmask() to simplify code.
> >
> > Signed-off-by: Yangtao Li
> > ---
> > v3:
> > -none
> > v2:
> > -convert to i_
On Thu, Mar 09, 2023 at 11:21:26PM +0800, Yangtao Li wrote:
> Use i_blockmask() to simplify code. BTW convert ocfs2_is_io_unaligned
> to return bool type.
>
> Signed-off-by: Yangtao Li
> ---
> v3:
> -none
> fs/ocfs2/file.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff
On Thu, Mar 09, 2023 at 11:21:25PM +0800, Yangtao Li wrote:
> Use i_blockmask() to simplify code.
>
> Signed-off-by: Yangtao Li
> ---
> v3:
> -none
> v2:
> -convert to i_blockmask()
> fs/ext4/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/e
On Thu, Mar 09, 2023 at 11:21:23PM +0800, Yangtao Li wrote:
> Use i_blockmask() to simplify code.
Umm... What's the branchpoint for that series? Not the mainline -
there we have i_blocksize() open-coded...
> Signed-off-by: Yangtao Li
> ---
> v3:
> -none
> v2:
> -convert to i_blockmask()
> fs/
On Sat, Jun 11, 2022 at 03:01:16PM +, Al Viro wrote:
> On Sat, Jun 11, 2022 at 07:00:52AM -0700, Guenter Roeck wrote:
> > On Sat, Jun 11, 2022 at 12:56:27PM +, Al Viro wrote:
> > > On Sat, Jun 11, 2022 at 12:37:44PM +, Al Viro wrote:
> > > > On Sat, Jun 11
On Sat, Jun 11, 2022 at 07:00:52AM -0700, Guenter Roeck wrote:
> On Sat, Jun 11, 2022 at 12:56:27PM +0000, Al Viro wrote:
> > On Sat, Jun 11, 2022 at 12:37:44PM +, Al Viro wrote:
> > > On Sat, Jun 11, 2022 at 12:12:47PM +, Al Viro wrote:
> > >
> >
On Sat, Jun 11, 2022 at 12:37:44PM +, Al Viro wrote:
> On Sat, Jun 11, 2022 at 12:12:47PM +0000, Al Viro wrote:
>
>
> > At a guess, should be
> > return min((size_t)nr * PAGE_SIZE - offset, maxsize);
> >
> > in both places. I'm more than half-a
On Sat, Jun 11, 2022 at 12:12:47PM +, Al Viro wrote:
> At a guess, should be
> return min((size_t)nr * PAGE_SIZE - offset, maxsize);
>
> in both places. I'm more than half-asleep right now; could you verify that it
> (as the last lines of both iter_xa
On Sat, Jun 11, 2022 at 11:45:03AM +0100, Sudip Mukherjee wrote:
> Hi All,
>
> The latest mainline kernel branch fails to build for "arm allmodconfig",
> "xtensa allmodconfig" and "csky allmodconfig" with the error:
>
> In file included from ./include/linux/kernel.h:26,
> from ./
On Fri, Dec 27, 2019 at 11:50:16AM +0800, Gao Xiang wrote:
> Hi Al,
>
> Greeting, we plan to convert erofs to new mount api for 5.6
>
> and I just notice your branch
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/log/?h=untested.fs_parse
>
> do a lot further work on fs context (e
On Sun, Jul 21, 2019 at 11:08:42AM +0800, Gao Xiang wrote:
> It is for debugging use as you said below, mainly for our internal
> testers whose jobs are
> to read kmsg logs and catch kernel problems. sb->s_id (device number)
> maybe not
> straight-forward for them compared with dev_name...
Huh? -
On Thu, Jul 11, 2019 at 10:57:34PM +0800, Gao Xiang wrote:
> This commit adds erofs super block operations, including (u)mount,
> remount_fs, show_options, statfs, in addition to some private
> icache management functions.
Could you explain what's the point of this
> + /* save the device name
d_splice_alias() does the right thing when given
ERR_PTR(-E...) for inode. No need for gotos, multiple
returns, etc. in there.
Signed-off-by: Al Viro
---
diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c
index 546a47156101..8cf0617d4ea0 100644
--- a/drivers
28 matches
Mail list logo