xfs_pnfs.c (740fd671e04f8a977018eb9cfe440b4817850f0d) xfs_pnfs.c (952da06375c8f3aa58474fff718d9ae8442531b9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2014 Christoph Hellwig.
4 */
5#include "xfs.h"
6#include "xfs_shared.h"
7#include "xfs_format.h"
8#include "xfs_log_format.h"

--- 141 unchanged lines hidden (view full) ---

150 if (offset + length > XFS_ISIZE(ip))
151 end_fsb = xfs_iomap_eof_align_last_fsb(ip, end_fsb);
152 else if (nimaps && imap.br_startblock == HOLESTARTBLOCK)
153 end_fsb = min(end_fsb, imap.br_startoff +
154 imap.br_blockcount);
155 xfs_iunlock(ip, lock_flags);
156
157 error = xfs_iomap_write_direct(ip, offset_fsb,
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2014 Christoph Hellwig.
4 */
5#include "xfs.h"
6#include "xfs_shared.h"
7#include "xfs_format.h"
8#include "xfs_log_format.h"

--- 141 unchanged lines hidden (view full) ---

150 if (offset + length > XFS_ISIZE(ip))
151 end_fsb = xfs_iomap_eof_align_last_fsb(ip, end_fsb);
152 else if (nimaps && imap.br_startblock == HOLESTARTBLOCK)
153 end_fsb = min(end_fsb, imap.br_startoff +
154 imap.br_blockcount);
155 xfs_iunlock(ip, lock_flags);
156
157 error = xfs_iomap_write_direct(ip, offset_fsb,
158 end_fsb - offset_fsb, &imap);
158 end_fsb - offset_fsb, 0, &imap);
159 if (error)
160 goto out_unlock;
161
162 /*
163 * Ensure the next transaction is committed synchronously so
164 * that the blocks allocated and handed out to the client are
165 * guaranteed to be present even after a server crash.
166 */

--- 132 unchanged lines hidden ---
159 if (error)
160 goto out_unlock;
161
162 /*
163 * Ensure the next transaction is committed synchronously so
164 * that the blocks allocated and handed out to the client are
165 * guaranteed to be present even after a server crash.
166 */

--- 132 unchanged lines hidden ---