All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@nvidia.com>
To: "david@fromorbit.com" <david@fromorbit.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"michael@ellerman.id.au" <michael@ellerman.id.au>
Subject: Re: [PATCH] debufgs: debugfs_create_blob can set the file size
Date: Wed, 7 Feb 2024 21:44:19 +0000	[thread overview]
Message-ID: <6f7565b9d38a6a9bddb407462ae53eb2ceaf0323.camel@nvidia.com> (raw)
In-Reply-To: <ZcP4xsiohW7jOe78@dread.disaster.area>

On Thu, 2024-02-08 at 08:40 +1100, Dave Chinner wrote:
> i_size_write()?

Thanks, I will post a v2.

> 
> And why doesn't debugfs_create_file_unsafe() do this already when it
> attaches the blob to the inode? 

Because it doesn't know the size any more.

The 'blob' in debugfs_create_blob() is this:

struct debugfs_blob_wrapper {
	void *data;
	unsigned long size;
};

When it passes the blob to debugfs_create_file_unsafe(), that's passed as
"void *data", and so debugfs_create_file_unsafe() doesn't know that it's a
'blob' any more.


  reply	other threads:[~2024-02-07 21:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 20:06 [PATCH] debufgs: debugfs_create_blob can set the file size Timur Tabi
2024-02-07 21:40 ` Dave Chinner
2024-02-07 21:44   ` Timur Tabi [this message]
2024-02-07 22:06     ` Dave Chinner
2024-02-07 22:18       ` Timur Tabi
2024-02-07 22:47         ` Dave Chinner
2024-02-07 22:07 ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f7565b9d38a6a9bddb407462ae53eb2ceaf0323.camel@nvidia.com \
    --to=ttabi@nvidia.com \
    --cc=david@fromorbit.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=michael@ellerman.id.au \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.