linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.14 009/642] fuse: Return EPERM rather than ENOSYS from link()
       [not found] <20250505221419.2672473-1-sashal@kernel.org>
@ 2025-05-05 22:03 ` Sasha Levin
  2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 010/642] exfat: call bh_read in get_block only when necessary Sasha Levin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2025-05-05 22:03 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Matt Johnston, Miklos Szeredi, Sasha Levin, miklos, linux-fsdevel

From: Matt Johnston <matt@codeconstruct.com.au>

[ Upstream commit 8344213571b2ac8caf013cfd3b37bc3467c3a893 ]

link() is documented to return EPERM when a filesystem doesn't support
the operation, return that instead.

Link: https://github.com/libfuse/libfuse/issues/925
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/fuse/dir.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 3b031d24d3691..8f699c67561fa 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1137,6 +1137,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
 	else if (err == -EINTR)
 		fuse_invalidate_attr(inode);
 
+	if (err == -ENOSYS)
+		err = -EPERM;
 	return err;
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 6.14 010/642] exfat: call bh_read in get_block only when necessary
       [not found] <20250505221419.2672473-1-sashal@kernel.org>
  2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 009/642] fuse: Return EPERM rather than ENOSYS from link() Sasha Levin
@ 2025-05-05 22:03 ` Sasha Levin
  2025-05-05 22:04 ` [PATCH AUTOSEL 6.14 067/642] pidfs: improve multi-threaded exec and premature thread-group leader exit polling Sasha Levin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2025-05-05 22:03 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sungjong Seo, Yuezhang Mo, Namjae Jeon, Sasha Levin,
	linux-fsdevel

From: Sungjong Seo <sj1557.seo@samsung.com>

[ Upstream commit c73e680d1f84059e1b1ea82a537f6ccc1c563eb4 ]

With commit 11a347fb6cef ("exfat: change to get file size from DataLength"),
exfat_get_block() can now handle valid_size. However, most partial
unwritten blocks that could be mapped with other blocks are being
inefficiently processed separately as individual blocks.

Except for partial unwritten blocks that require independent processing,
let's handle them simply as before.

Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/exfat/inode.c | 159 +++++++++++++++++++++++------------------------
 1 file changed, 77 insertions(+), 82 deletions(-)

diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
index a23677de4544f..b22c02d6000f7 100644
--- a/fs/exfat/inode.c
+++ b/fs/exfat/inode.c
@@ -274,9 +274,11 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
 	sector_t last_block;
 	sector_t phys = 0;
 	sector_t valid_blks;
+	loff_t i_size;
 
 	mutex_lock(&sbi->s_lock);
-	last_block = EXFAT_B_TO_BLK_ROUND_UP(i_size_read(inode), sb);
+	i_size = i_size_read(inode);
+	last_block = EXFAT_B_TO_BLK_ROUND_UP(i_size, sb);
 	if (iblock >= last_block && !create)
 		goto done;
 
@@ -305,102 +307,95 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
 	if (buffer_delay(bh_result))
 		clear_buffer_delay(bh_result);
 
-	if (create) {
+	/*
+	 * In most cases, we just need to set bh_result to mapped, unmapped
+	 * or new status as follows:
+	 *  1. i_size == valid_size
+	 *  2. write case (create == 1)
+	 *  3. direct_read (!bh_result->b_folio)
+	 *     -> the unwritten part will be zeroed in exfat_direct_IO()
+	 *
+	 * Otherwise, in the case of buffered read, it is necessary to take
+	 * care the last nested block if valid_size is not equal to i_size.
+	 */
+	if (i_size == ei->valid_size || create || !bh_result->b_folio)
 		valid_blks = EXFAT_B_TO_BLK_ROUND_UP(ei->valid_size, sb);
+	else
+		valid_blks = EXFAT_B_TO_BLK(ei->valid_size, sb);
 
-		if (iblock + max_blocks < valid_blks) {
-			/* The range has been written, map it */
-			goto done;
-		} else if (iblock < valid_blks) {
-			/*
-			 * The range has been partially written,
-			 * map the written part.
-			 */
-			max_blocks = valid_blks - iblock;
-			goto done;
-		}
+	/* The range has been fully written, map it */
+	if (iblock + max_blocks < valid_blks)
+		goto done;
 
-		/* The area has not been written, map and mark as new. */
-		set_buffer_new(bh_result);
+	/* The range has been partially written, map the written part */
+	if (iblock < valid_blks) {
+		max_blocks = valid_blks - iblock;
+		goto done;
+	}
 
+	/* The area has not been written, map and mark as new for create case */
+	if (create) {
+		set_buffer_new(bh_result);
 		ei->valid_size = EXFAT_BLK_TO_B(iblock + max_blocks, sb);
 		mark_inode_dirty(inode);
-	} else {
-		valid_blks = EXFAT_B_TO_BLK(ei->valid_size, sb);
+		goto done;
+	}
 
-		if (iblock + max_blocks < valid_blks) {
-			/* The range has been written, map it */
-			goto done;
-		} else if (iblock < valid_blks) {
-			/*
-			 * The area has been partially written,
-			 * map the written part.
-			 */
-			max_blocks = valid_blks - iblock;
+	/*
+	 * The area has just one block partially written.
+	 * In that case, we should read and fill the unwritten part of
+	 * a block with zero.
+	 */
+	if (bh_result->b_folio && iblock == valid_blks &&
+	    (ei->valid_size & (sb->s_blocksize - 1))) {
+		loff_t size, pos;
+		void *addr;
+
+		max_blocks = 1;
+
+		/*
+		 * No buffer_head is allocated.
+		 * (1) bmap: It's enough to set blocknr without I/O.
+		 * (2) read: The unwritten part should be filled with zero.
+		 *           If a folio does not have any buffers,
+		 *           let's returns -EAGAIN to fallback to
+		 *           block_read_full_folio() for per-bh IO.
+		 */
+		if (!folio_buffers(bh_result->b_folio)) {
+			err = -EAGAIN;
 			goto done;
-		} else if (iblock == valid_blks &&
-			   (ei->valid_size & (sb->s_blocksize - 1))) {
-			/*
-			 * The block has been partially written,
-			 * zero the unwritten part and map the block.
-			 */
-			loff_t size, pos;
-			void *addr;
-
-			max_blocks = 1;
-
-			/*
-			 * For direct read, the unwritten part will be zeroed in
-			 * exfat_direct_IO()
-			 */
-			if (!bh_result->b_folio)
-				goto done;
-
-			/*
-			 * No buffer_head is allocated.
-			 * (1) bmap: It's enough to fill bh_result without I/O.
-			 * (2) read: The unwritten part should be filled with 0
-			 *           If a folio does not have any buffers,
-			 *           let's returns -EAGAIN to fallback to
-			 *           per-bh IO like block_read_full_folio().
-			 */
-			if (!folio_buffers(bh_result->b_folio)) {
-				err = -EAGAIN;
-				goto done;
-			}
+		}
 
-			pos = EXFAT_BLK_TO_B(iblock, sb);
-			size = ei->valid_size - pos;
-			addr = folio_address(bh_result->b_folio) +
-			       offset_in_folio(bh_result->b_folio, pos);
+		pos = EXFAT_BLK_TO_B(iblock, sb);
+		size = ei->valid_size - pos;
+		addr = folio_address(bh_result->b_folio) +
+			offset_in_folio(bh_result->b_folio, pos);
 
-			/* Check if bh->b_data points to proper addr in folio */
-			if (bh_result->b_data != addr) {
-				exfat_fs_error_ratelimit(sb,
+		/* Check if bh->b_data points to proper addr in folio */
+		if (bh_result->b_data != addr) {
+			exfat_fs_error_ratelimit(sb,
 					"b_data(%p) != folio_addr(%p)",
 					bh_result->b_data, addr);
-				err = -EINVAL;
-				goto done;
-			}
-
-			/* Read a block */
-			err = bh_read(bh_result, 0);
-			if (err < 0)
-				goto done;
+			err = -EINVAL;
+			goto done;
+		}
 
-			/* Zero unwritten part of a block */
-			memset(bh_result->b_data + size, 0,
-			       bh_result->b_size - size);
+		/* Read a block */
+		err = bh_read(bh_result, 0);
+		if (err < 0)
+			goto done;
 
-			err = 0;
-		} else {
-			/*
-			 * The range has not been written, clear the mapped flag
-			 * to only zero the cache and do not read from disk.
-			 */
-			clear_buffer_mapped(bh_result);
-		}
+		/* Zero unwritten part of a block */
+		memset(bh_result->b_data + size, 0, bh_result->b_size - size);
+		err = 0;
+		goto done;
 	}
+
+	/*
+	 * The area has not been written, clear mapped for read/bmap cases.
+	 * If so, it will be filled with zero without reading from disk.
+	 */
+	clear_buffer_mapped(bh_result);
 done:
 	bh_result->b_size = EXFAT_BLK_TO_B(max_blocks, sb);
 	if (err < 0)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 6.14 067/642] pidfs: improve multi-threaded exec and premature thread-group leader exit polling
       [not found] <20250505221419.2672473-1-sashal@kernel.org>
  2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 009/642] fuse: Return EPERM rather than ENOSYS from link() Sasha Levin
  2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 010/642] exfat: call bh_read in get_block only when necessary Sasha Levin
@ 2025-05-05 22:04 ` Sasha Levin
  2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 209/642] fs/pipe: Limit the slots in pipe_resize_ring() Sasha Levin
  2025-05-05 22:09 ` [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize Sasha Levin
  4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2025-05-05 22:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Christian Brauner, Oleg Nesterov, Sasha Levin, viro, akpm, mhocko,
	Liam.Howlett, mjguzik, alexjlzheng, pasha.tatashin, tglx,
	frederic, peterz, lorenzo.stoakes, linux-fsdevel

From: Christian Brauner <brauner@kernel.org>

[ Upstream commit 0fb482728ba1ee2130eaa461bf551f014447997c ]

This is another attempt trying to make pidfd polling for multi-threaded
exec and premature thread-group leader exit consistent.

A quick recap of these two cases:

(1) During a multi-threaded exec by a subthread, i.e., non-thread-group
    leader thread, all other threads in the thread-group including the
    thread-group leader are killed and the struct pid of the
    thread-group leader will be taken over by the subthread that called
    exec. IOW, two tasks change their TIDs.

(2) A premature thread-group leader exit means that the thread-group
    leader exited before all of the other subthreads in the thread-group
    have exited.

Both cases lead to inconsistencies for pidfd polling with PIDFD_THREAD.
Any caller that holds a PIDFD_THREAD pidfd to the current thread-group
leader may or may not see an exit notification on the file descriptor
depending on when poll is performed. If the poll is performed before the
exec of the subthread has concluded an exit notification is generated
for the old thread-group leader. If the poll is performed after the exec
of the subthread has concluded no exit notification is generated for the
old thread-group leader.

The correct behavior would be to simply not generate an exit
notification on the struct pid of a subhthread exec because the struct
pid is taken over by the subthread and thus remains alive.

But this is difficult to handle because a thread-group may exit
prematurely as mentioned in (2). In that case an exit notification is
reliably generated but the subthreads may continue to run for an
indeterminate amount of time and thus also may exec at some point.

So far there was no way to distinguish between (1) and (2) internally.
This tiny series tries to address this problem by discarding
PIDFD_THREAD notification on premature thread-group leader exit.

If that works correctly then no exit notifications are generated for a
PIDFD_THREAD pidfd for a thread-group leader until all subthreads have
been reaped. If a subthread should exec aftewards no exit notification
will be generated until that task exits or it creates subthreads and
repeates the cycle.

Co-Developed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250320-work-pidfs-thread_group-v4-1-da678ce805bf@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/pidfs.c      | 9 +++++----
 kernel/exit.c   | 6 +++---
 kernel/signal.c | 3 +--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/fs/pidfs.c b/fs/pidfs.c
index c0478b3c55d9f..9aa4c705776dd 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -188,20 +188,21 @@ static void pidfd_show_fdinfo(struct seq_file *m, struct file *f)
 static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
 {
 	struct pid *pid = pidfd_pid(file);
-	bool thread = file->f_flags & PIDFD_THREAD;
 	struct task_struct *task;
 	__poll_t poll_flags = 0;
 
 	poll_wait(file, &pid->wait_pidfd, pts);
 	/*
-	 * Depending on PIDFD_THREAD, inform pollers when the thread
-	 * or the whole thread-group exits.
+	 * Don't wake waiters if the thread-group leader exited
+	 * prematurely. They either get notified when the last subthread
+	 * exits or not at all if one of the remaining subthreads execs
+	 * and assumes the struct pid of the old thread-group leader.
 	 */
 	guard(rcu)();
 	task = pid_task(pid, PIDTYPE_PID);
 	if (!task)
 		poll_flags = EPOLLIN | EPOLLRDNORM | EPOLLHUP;
-	else if (task->exit_state && (thread || thread_group_empty(task)))
+	else if (task->exit_state && !delay_group_leader(task))
 		poll_flags = EPOLLIN | EPOLLRDNORM;
 
 	return poll_flags;
diff --git a/kernel/exit.c b/kernel/exit.c
index 6bb59b16e33e1..a9960dd6d0aa0 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -744,10 +744,10 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
 
 	tsk->exit_state = EXIT_ZOMBIE;
 	/*
-	 * sub-thread or delay_group_leader(), wake up the
-	 * PIDFD_THREAD waiters.
+	 * Ignore thread-group leaders that exited before all
+	 * subthreads did.
 	 */
-	if (!thread_group_empty(tsk))
+	if (!delay_group_leader(tsk))
 		do_notify_pidfd(tsk);
 
 	if (unlikely(tsk->ptrace)) {
diff --git a/kernel/signal.c b/kernel/signal.c
index 875e97f6205a2..b2e5c90f29602 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2180,8 +2180,7 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
 	WARN_ON_ONCE(!tsk->ptrace &&
 	       (tsk->group_leader != tsk || !thread_group_empty(tsk)));
 	/*
-	 * tsk is a group leader and has no threads, wake up the
-	 * non-PIDFD_THREAD waiters.
+	 * Notify for thread-group leaders without subthreads.
 	 */
 	if (thread_group_empty(tsk))
 		do_notify_pidfd(tsk);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 6.14 209/642] fs/pipe: Limit the slots in pipe_resize_ring()
       [not found] <20250505221419.2672473-1-sashal@kernel.org>
                   ` (2 preceding siblings ...)
  2025-05-05 22:04 ` [PATCH AUTOSEL 6.14 067/642] pidfs: improve multi-threaded exec and premature thread-group leader exit polling Sasha Levin
@ 2025-05-05 22:07 ` Sasha Levin
  2025-05-05 22:09 ` [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize Sasha Levin
  4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2025-05-05 22:07 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: K Prateek Nayak, Linus Torvalds, Oleg Nesterov, Christian Brauner,
	Sasha Levin, viro, linux-fsdevel

From: K Prateek Nayak <kprateek.nayak@amd.com>

[ Upstream commit cf3d0c54b21c4a351d4f94cf188e9715dbd1ef5b ]

Limit the number of slots in pipe_resize_ring() to the maximum value
representable by pipe->{head,tail}. Values beyond the max limit can
lead to incorrect pipe occupancy related calculations where the pipe
will never appear full.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20250307052919.34542-2-kprateek.nayak@amd.com
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/pipe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/pipe.c b/fs/pipe.c
index 4d0799e4e7196..88e81f84e3eaf 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1271,6 +1271,10 @@ int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots)
 	struct pipe_buffer *bufs;
 	unsigned int head, tail, mask, n;
 
+	/* nr_slots larger than limits of pipe->{head,tail} */
+	if (unlikely(nr_slots > (pipe_index_t)-1u))
+		return -EINVAL;
+
 	bufs = kcalloc(nr_slots, sizeof(*bufs),
 		       GFP_KERNEL_ACCOUNT | __GFP_NOWARN);
 	if (unlikely(!bufs))
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize
       [not found] <20250505221419.2672473-1-sashal@kernel.org>
                   ` (3 preceding siblings ...)
  2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 209/642] fs/pipe: Limit the slots in pipe_resize_ring() Sasha Levin
@ 2025-05-05 22:09 ` Sasha Levin
  2025-05-06  1:01   ` Luis Chamberlain
  4 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2025-05-05 22:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Hannes Reinecke, Matthew Wilcox (Oracle), Luis Chamberlain,
	Hannes Reinecke, Christian Brauner, Sasha Levin, viro,
	linux-fsdevel

From: Hannes Reinecke <hare@kernel.org>

[ Upstream commit 86c60efd7c0ede43bd677f2eee1d84200528df1e ]

For large blocksizes the number of block bits is larger than PAGE_SHIFT,
so calculate the sector number from the byte offset instead. This is
required to enable large folios with buffer-heads.

Reviewed-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Link: https://lore.kernel.org/r/20250221223823.1680616-4-mcgrof@kernel.org
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/mpage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/mpage.c b/fs/mpage.c
index 82aecf3727437..a3c82206977f6 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -181,7 +181,7 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
 	if (folio_buffers(folio))
 		goto confused;
 
-	block_in_file = (sector_t)folio->index << (PAGE_SHIFT - blkbits);
+	block_in_file = folio_pos(folio) >> blkbits;
 	last_block = block_in_file + args->nr_pages * blocks_per_page;
 	last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits;
 	if (last_block > last_block_in_file)
@@ -527,7 +527,7 @@ static int __mpage_writepage(struct folio *folio, struct writeback_control *wbc,
 	 * The page has no buffers: map it to disk
 	 */
 	BUG_ON(!folio_test_uptodate(folio));
-	block_in_file = (sector_t)folio->index << (PAGE_SHIFT - blkbits);
+	block_in_file = folio_pos(folio) >> blkbits;
 	/*
 	 * Whole page beyond EOF? Skip allocating blocks to avoid leaking
 	 * space.
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize
  2025-05-05 22:09 ` [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize Sasha Levin
@ 2025-05-06  1:01   ` Luis Chamberlain
  2025-05-06 13:51     ` Sasha Levin
  0 siblings, 1 reply; 7+ messages in thread
From: Luis Chamberlain @ 2025-05-06  1:01 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Hannes Reinecke, Matthew Wilcox (Oracle),
	Hannes Reinecke, Christian Brauner, viro, linux-fsdevel

On Mon, May 05, 2025 at 06:09:18PM -0400, Sasha Levin wrote:
> From: Hannes Reinecke <hare@kernel.org>
> 
> [ Upstream commit 86c60efd7c0ede43bd677f2eee1d84200528df1e ]
> 
> For large blocksizes the number of block bits is larger than PAGE_SHIFT,
> so calculate the sector number from the byte offset instead. This is
> required to enable large folios with buffer-heads.
> 
> Reviewed-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> Signed-off-by: Hannes Reinecke <hare@kernel.org>
> Link: https://lore.kernel.org/r/20250221223823.1680616-4-mcgrof@kernel.org
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Christian Brauner <brauner@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This is not relevant to older kernels as we had no buffer-head usage of
large folios before v6.15. So this is just creating noise / drama for
older kernels.

Where's that code for  auto-sel again?

  Luis

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize
  2025-05-06  1:01   ` Luis Chamberlain
@ 2025-05-06 13:51     ` Sasha Levin
  0 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2025-05-06 13:51 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: linux-kernel, stable, Hannes Reinecke, Matthew Wilcox (Oracle),
	Hannes Reinecke, Christian Brauner, viro, linux-fsdevel

On Mon, May 05, 2025 at 06:01:55PM -0700, Luis Chamberlain wrote:
>On Mon, May 05, 2025 at 06:09:18PM -0400, Sasha Levin wrote:
>> From: Hannes Reinecke <hare@kernel.org>
>>
>> [ Upstream commit 86c60efd7c0ede43bd677f2eee1d84200528df1e ]
>>
>> For large blocksizes the number of block bits is larger than PAGE_SHIFT,
>> so calculate the sector number from the byte offset instead. This is
>> required to enable large folios with buffer-heads.
>>
>> Reviewed-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
>> Signed-off-by: Hannes Reinecke <hare@kernel.org>
>> Link: https://lore.kernel.org/r/20250221223823.1680616-4-mcgrof@kernel.org
>> Reviewed-by: Hannes Reinecke <hare@suse.de>
>> Signed-off-by: Christian Brauner <brauner@kernel.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>This is not relevant to older kernels as we had no buffer-head usage of
>large folios before v6.15. So this is just creating noise / drama for
>older kernels.

Sure, I'll drop it.

>Where's that code for  auto-sel again?

https://git.sr.ht/~sashal/autosel :)

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-06 13:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250505221419.2672473-1-sashal@kernel.org>
2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 009/642] fuse: Return EPERM rather than ENOSYS from link() Sasha Levin
2025-05-05 22:03 ` [PATCH AUTOSEL 6.14 010/642] exfat: call bh_read in get_block only when necessary Sasha Levin
2025-05-05 22:04 ` [PATCH AUTOSEL 6.14 067/642] pidfs: improve multi-threaded exec and premature thread-group leader exit polling Sasha Levin
2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 209/642] fs/pipe: Limit the slots in pipe_resize_ring() Sasha Levin
2025-05-05 22:09 ` [PATCH AUTOSEL 6.14 342/642] fs/mpage: avoid negative shift for large blocksize Sasha Levin
2025-05-06  1:01   ` Luis Chamberlain
2025-05-06 13:51     ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).