mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@uls.co.za>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: bernd.schubert@fastmail.fm, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, miklos@szeredi.hu,
	rdunlap@infradead.org, trapexit@spawn.link
Subject: Re: [PATCH 1/2] fs: Supply dir_context.count as readdir buffer size hint
Date: Sun, 30 Mar 2025 16:27:25 +0200	[thread overview]
Message-ID: <cb0c9321-9c1d-4910-bcbd-3d0ca10d62cb@uls.co.za> (raw)
In-Reply-To: <b1baac64-f56d-4d0f-92f1-d7bb808a151b@wanadoo.fr>

ACK.  Fixed locally.

Thank you.

Will give a few more days before re-sending.

Kind regards,
Jaco

On 2025/03/29 11:20, Christophe JAILLET wrote:

> Hi,
>
> a few nitpicks below to reduce the diffpatch with unrelated changes. 
> (trainling spaces)
>
>
> Le 14/03/2025 à 23:16, Jaco Kroon a écrit :
>> This was provided by Miklos <miklos@szeredi.hu> via LKML on 2023/07/27
>> subject "Re: [PATCH] fuse: enable larger read buffers for readdir.".
>>
>> This is thus preperation for an improved fuse readdir() patch. The
>
> s/preperation/preparation/
>
>> description he provided:
>>
>> "The best strategy would be to find the optimal buffer size based on 
>> the size of
>> the userspace buffer.  Putting that info into struct dir_context 
>> doesn't sound
>> too complicated...
>>
>> "Here's a patch.  It doesn't touch readdir.  Simply setting the fuse 
>> buffer size
>> to the userspace buffer size should work, the record sizes are 
>> similar (fuse's
>> is slightly larger than libc's, so no overflow should ever happen)."
>
> ...
>
>> @@ -239,7 +240,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
>>     /*
>>    * New, all-improved, singing, dancing, iBCS2-compliant getdents()
>> - * interface.
>> + * interface.
>
> Unrelated change.
>
>>    */
>>   struct linux_dirent {
>>       unsigned long    d_ino;
>
> ...
>
>> diff --git a/include/linux/fs.h b/include/linux/fs.h
>> index 2788df98080f..1e426e2b5999 100644
>> --- a/include/linux/fs.h
>> +++ b/include/linux/fs.h
>> @@ -308,7 +308,7 @@ struct iattr {
>>    */
>>   #define FILESYSTEM_MAX_STACK_DEPTH 2
>>   -/**
>> +/**
>
> Unrelated change.
>
>>    * enum positive_aop_returns - aop return codes with specific 
>> semantics
>>    *
>>    * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has
>> @@ -318,7 +318,7 @@ struct iattr {
>>    *                 be a candidate for writeback again in the near
>>    *                 future.  Other callers must be careful to unlock
>>    *                 the page if they get this return.  Returned by
>> - *                 writepage();
>> + *                 writepage();
>
> Unrelated change.
>
>>    *
>>    * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked 
>> page has
>>    *              unlocked it and the page might have been truncated.
>> @@ -1151,8 +1151,8 @@ struct file *get_file_active(struct file **f);
>>     #define    MAX_NON_LFS    ((1UL<<31) - 1)
>>   -/* Page cache limit. The filesystems should put that into their 
>> s_maxbytes
>> -   limits, otherwise bad things can happen in VM. */
>> +/* Page cache limit. The filesystems should put that into their 
>> s_maxbytes
>> +   limits, otherwise bad things can happen in VM. */
>
> Unrelated change.
>
>>   #if BITS_PER_LONG==32
>>   #define MAX_LFS_FILESIZE    ((loff_t)ULONG_MAX << PAGE_SHIFT)
>>   #elif BITS_PER_LONG==64
>> @@ -2073,6 +2073,13 @@ typedef bool (*filldir_t)(struct dir_context 
>> *, const char *, int, loff_t, u64,
>>   struct dir_context {
>>       filldir_t actor;
>>       loff_t pos;
>> +    /*
>> +     * Filesystems MUST NOT MODIFY count, but may use as a hint:
>> +     * 0        unknown
>> +     * > 0      space in buffer (assume at least one entry)
>> +     * INT_MAX  unlimited
>> +     */
>> +    int count;
>>   };
>>     /*
>> @@ -2609,7 +2616,7 @@ int sync_inode_metadata(struct inode *inode, 
>> int wait);
>>   struct file_system_type {
>>       const char *name;
>>       int fs_flags;
>> -#define FS_REQUIRES_DEV        1
>> +#define FS_REQUIRES_DEV        1
>
> Unrelated change.
>
>>   #define FS_BINARY_MOUNTDATA    2
>>   #define FS_HAS_SUBTYPE        4
>>   #define FS_USERNS_MOUNT        8    /* Can be mounted by userns 
>> root */
>> @@ -3189,7 +3196,7 @@ ssize_t __kernel_read(struct file *file, void 
>> *buf, size_t count, loff_t *pos);
>>   extern ssize_t kernel_write(struct file *, const void *, size_t, 
>> loff_t *);
>>   extern ssize_t __kernel_write(struct file *, const void *, size_t, 
>> loff_t *);
>>   extern struct file * open_exec(const char *);
>> -
>> +
>
> Unrelated change.
>
>>   /* fs/dcache.c -- generic fs support functions */
>>   extern bool is_subdir(struct dentry *, struct dentry *);
>>   extern bool path_is_under(const struct path *, const struct path *);
>

  reply	other threads:[~2025-03-30 14:27 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 10:59 [PATCH] fuse: enable larger read buffers for readdir Jaco Kroon
2023-07-26 11:43 ` Jaco Kroon
2023-07-26 13:53 ` Bernd Schubert
2023-07-26 15:26   ` Jaco Kroon
2023-07-26 15:30     ` Bernd Schubert
2023-07-26 15:45     ` Bernd Schubert
2023-07-26 17:23       ` Antonio SJ Musumeci
2023-07-26 18:25         ` Jaco Kroon
2023-07-27 15:21           ` Miklos Szeredi
2023-07-27 19:21           ` Miklos Szeredi
2023-07-27 19:43             ` Bernd Schubert
2023-07-28  8:42               ` Miklos Szeredi
2023-07-26 15:19 ` Randy Dunlap
2023-07-27  8:12 ` [PATCH] fuse: enable larger read buffers for readdir [v2] Jaco Kroon
2023-07-27 15:35   ` Miklos Szeredi
2023-07-27 16:58     ` Jaco Kroon
2023-07-27 19:17       ` Miklos Szeredi
2023-07-27 19:16     ` Bernd Schubert
2023-07-27 20:35     ` Bernd Schubert
2023-07-28  5:05       ` Jaco Kroon
2025-03-14 22:16   ` fuse: increase readdir() buffer size Jaco Kroon
2025-03-14 22:16     ` [PATCH 1/2] fs: Supply dir_context.count as readdir buffer size hint Jaco Kroon
2025-03-29  9:20       ` Christophe JAILLET
2025-03-30 14:27         ` Jaco Kroon [this message]
2025-03-14 22:16     ` [PATCH 2/2] fuse: Adjust readdir() buffer to requesting buffer size Jaco Kroon
2025-03-31 16:41       ` Joanne Koong
2025-03-31 20:43         ` Jaco Kroon
2025-03-31 21:48           ` Joanne Koong
2025-03-31 23:01             ` Joanne Koong
2025-03-28 10:15     ` fuse: increase readdir() " Jaco Kroon
2025-03-28 10:16       ` Bernd Schubert
2025-03-28 19:40       ` David Laight
2025-03-29  8:59         ` Jaco Kroon
2025-04-01 14:18     ` fuse: increase readdir() buffer size [v4] Jaco Kroon
2025-04-01 14:18       ` [PATCH 1/2] fs: Supply dir_context.count as readdir buffer size hint Jaco Kroon
2025-04-01 14:18       ` [PATCH 2/2] fuse: Adjust readdir() buffer to requesting buffer size Jaco Kroon
2025-04-01 14:40         ` Miklos Szeredi
2025-04-01 15:03           ` Jaco Kroon
2025-04-01 15:33             ` Miklos Szeredi
2025-04-02  7:54               ` Jaco Kroon
2025-04-02  8:18                 ` Miklos Szeredi
2025-04-02  8:52                   ` Jaco Kroon
2025-04-02  9:10                     ` Bernd Schubert
2025-04-02 11:13                       ` Jaco Kroon
2025-04-02 11:35                         ` Miklos Szeredi
2025-04-02 11:59                         ` Bernd Schubert
2025-04-08 14:19               ` Bernd Schubert
2025-04-09  7:12                 ` Jaco Kroon
2025-04-09  8:31                   ` Bernd Schubert
2025-04-09 15:03                     ` Jaco Kroon

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=cb0c9321-9c1d-4910-bcbd-3d0ca10d62cb@uls.co.za \
    --to=jaco@uls.co.za \
    --cc=bernd.schubert@fastmail.fm \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=rdunlap@infradead.org \
    --cc=trapexit@spawn.link \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®