On Mon, Jun 12, 2023 at 11:02 PM Matthew Wilcox (Oracle)
wrote:
> This kind of started off as a gfs2 patch series, then became entwined
> with buffer heads once I realised that gfs2 was the only remaining
> caller of __block_write_full_page(). For those not in the gfs2 world,
> the big point of
Remove nine hidden calls to compound_head() by using a folio instead
of a page.
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
fs/buffer.c | 53 +++--
fs/gfs2/aops.c | 5 ++--
We may someday support folios larger than 4GB, so use a size_t for
the byte count within a folio to prevent unpleasant truncations.
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
fs/gfs2/aops.c | 6 +++---
fs/gfs2/aops.h | 2 +-
2 files changed, 4
This removes a hidden call to compound_head() inside
__block_commit_write() and moves it to those callers which are still
page based. Also make block_write_end() safe for large folios.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 38 +++---
1 file
This kind of started off as a gfs2 patch series, then became entwined
with buffer heads once I realised that gfs2 was the only remaining
caller of __block_write_full_page(). For those not in the gfs2 world,
the big point of this series is that block_write_full_page() should now
handle large
Replace a few implicit calls to compound_head() with one explicit one.
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
fs/gfs2/aops.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index
Remove a couple of folio->page conversions in the callers, and two
calls to compound_head() in the function itself. Rename it from
__gfs2_jdata_writepage() to __gfs2_jdata_write_folio().
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
If any page in a folio is dirtied, dirty the entire folio. Removes a
number of hidden calls to compound_head() and references to page->mapping
and page->index. Fixes a pre-existing bug where we could mark a folio
as dirty if the file is truncated to a multiple of the page size just
as we take
Keep the interface as struct page, but work entirely on the folio
internally. Removes several PAGE_SIZE assumptions and removes
some references to page->index and page->mapping.
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
fs/buffer.c | 22
Saves a call to compound_head() and may be needed to support
block size > PAGE_SIZE.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 4ca2eb2b3dca..c38fdcaa32ff 100644
---
Add support for large folios and remove some accesses to page->mapping
and page->index.
Signed-off-by: Matthew Wilcox (Oracle)
Tested-by: Bob Peterson
Reviewed-by: Bob Peterson
---
fs/gfs2/aops.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git
Most of the callers already have a folio; convert reiserfs_write_end()
to have a folio. Removes a couple of hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 27 ++-
fs/ext4/inode.c | 4 ++--
Use the folio API and pass the folio from both callers.
Saves a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index
Support large folios in block_truncate_page() and avoid three hidden
calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index
Its one caller already has a folio, so switch it to use the
folio API. Removes a hidden call to compound_head().
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index
Get a folio from the page cache instead of a page, then use the
folio API throughout. Removes a few calls to compound_head()
and may be needed to support block size > PAGE_SIZE.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/buffer.c | 34 +++---
1 file changed, 15
From: Bob Peterson
In gfs2_file_buffered_write(), we currently jump from the second call of
function should_fault_in_pages() to above the first call, so
should_fault_in_pages() is getting called twice in a row, causing it to
accidentally fall back to single-page writes rather than trying the
All the remaining users of gfs2_freeze_lock_shared() set freeze_gh to
>sd_freeze_gh and flags to 0, so remove those two parameters.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/ops_fstype.c | 2 +-
fs/gfs2/super.c | 4 ++--
fs/gfs2/util.c | 9 +++--
fs/gfs2/util.h | 4
So far, at mount time, gfs2 would take the freeze glock in shared mode
and then immediately drop it again, turning it into a cached glock that
can be reclaimed at any time. To freeze the filesystem cluster-wide,
the node initiating the freeze would take the freeze glock in exclusive
mode, which
Replace sd_freeze_state with a new SDF_FROZEN flag.
There no longer is a need for indicating that a freeze is in progress
(SDF_STARTING_FREEZE); we are now protecting the critical sections with
the sd_freeze_mutex.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/incore.h | 8 +---
Rename the SDF_FS_FROZEN flag to SDF_FREEZE_INITIATOR to indicate more
clearly that the node that has this flag set is the initiator of the
freeze.
Signed-off-by: Andreas Gruenbacher sd_flags);
- wake_up_bit(>sd_flags, SDF_FS_FROZEN);
+ clear_bit_unlock(SDF_FREEZE_INITIATOR,
Reconfiguring a frozen filesystem is already rejected in
reconfigure_super(), so there is no need to check for that condition
again at the filesystem level.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/ops_fstype.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/fs/gfs2/ops_fstype.c
Rename gfs2_freeze_lock to gfs2_freeze_lock_shared to make it a bit more
obvious that this function establishes the "thawed" state of the freeze
glock.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/ops_fstype.c | 4 ++--
fs/gfs2/recovery.c | 2 +-
fs/gfs2/super.c | 2 +-
Rename gfs2_freeze to gfs2_freeze_super and gfs2_unfreeze to
gfs2_thaw_super to match the names of the corresponding super
operations.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/super.c | 12 ++--
fs/gfs2/util.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git
The transaction glock was repurposed to serve as the new freeze glock
years ago. Don't refer to it as the transaction glock anymore.
Also, to be more precise, call it the "freeze glock" instead of the
"freeze lock". Ditto for the journal glock.
Signed-off-by: Andreas Gruenbacher
---
Currently, filesystem freeze is implemented inside freeze_go_sync(), a
glock state transition callback. It turns out that in some scenarios,
freezing the filesystem in such a callback can deadlock. To prevent
that from happening, rework the freeze / thaw logic and move it out of
the glock state
On Mon, Jun 12, 2023 at 7:54 AM Christoph Hellwig wrote:
> Since commit a2ad63daa88b ("VFS: add FMODE_CAN_ODIRECT file flag") file
> systems can just set the FMODE_CAN_ODIRECT flag at open time instead of
> wiring up a dummy direct_IO method to indicate support for direct I/O.
>
> Remove
kernel test robot wrote:
> kernel test robot noticed a 11.6% improvement of
> stress-ng.sendfile.ops_per_sec on:
If it's sending to a socket, this is entirely feasible. The
splice_to_socket() function now sends multiple pages in one go to the network
protocol's sendmsg() method to process
On Fri, 2023-06-09 at 18:44 +0200, Andreas Gruenbacher wrote:
> Jeff,
>
> On Fri, Jun 9, 2023 at 2:50 PM Jeff Layton wrote:
> > Signed-off-by: Jeff Layton
> > ---
> > fs/gfs2/quota.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/gfs2/quota.c
29 matches
Mail list logo