diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-18 02:19:48 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2018-10-18 02:19:48 -0400 |
commit | d392bc81bb7c26ea6225d088ead344ed6486b495 (patch) | |
tree | 0f8b7e9b8b7d8b572ba90726b05be3eb6ce09884 | |
parent | fc439464e3ee299d8a3d502d7d24d4d6a5686879 (diff) |
xfs: remove the unused trimmed argument from xfs_reflink_trim_around_shared
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_iomap.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_reflink.c | 15 | ||||
-rw-r--r-- | fs/xfs/xfs_reflink.h | 2 |
4 files changed, 10 insertions, 16 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 416524f6ba69..7cfda25f1bb1 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -406,10 +406,10 @@ xfs_getbmap_report_one( | |||
406 | struct xfs_bmbt_irec *got) | 406 | struct xfs_bmbt_irec *got) |
407 | { | 407 | { |
408 | struct kgetbmap *p = out + bmv->bmv_entries; | 408 | struct kgetbmap *p = out + bmv->bmv_entries; |
409 | bool shared = false, trimmed = false; | 409 | bool shared = false; |
410 | int error; | 410 | int error; |
411 | 411 | ||
412 | error = xfs_reflink_trim_around_shared(ip, got, &shared, &trimmed); | 412 | error = xfs_reflink_trim_around_shared(ip, got, &shared); |
413 | if (error) | 413 | if (error) |
414 | return error; | 414 | return error; |
415 | 415 | ||
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index bdba6b91598a..27c93b5f029d 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -1032,7 +1032,7 @@ xfs_file_iomap_begin( | |||
1032 | struct xfs_bmbt_irec imap; | 1032 | struct xfs_bmbt_irec imap; |
1033 | xfs_fileoff_t offset_fsb, end_fsb; | 1033 | xfs_fileoff_t offset_fsb, end_fsb; |
1034 | int nimaps = 1, error = 0; | 1034 | int nimaps = 1, error = 0; |
1035 | bool shared = false, trimmed = false; | 1035 | bool shared = false; |
1036 | unsigned lockmode; | 1036 | unsigned lockmode; |
1037 | 1037 | ||
1038 | if (XFS_FORCED_SHUTDOWN(mp)) | 1038 | if (XFS_FORCED_SHUTDOWN(mp)) |
@@ -1068,8 +1068,7 @@ xfs_file_iomap_begin( | |||
1068 | 1068 | ||
1069 | if (flags & IOMAP_REPORT) { | 1069 | if (flags & IOMAP_REPORT) { |
1070 | /* Trim the mapping to the nearest shared extent boundary. */ | 1070 | /* Trim the mapping to the nearest shared extent boundary. */ |
1071 | error = xfs_reflink_trim_around_shared(ip, &imap, &shared, | 1071 | error = xfs_reflink_trim_around_shared(ip, &imap, &shared); |
1072 | &trimmed); | ||
1073 | if (error) | 1072 | if (error) |
1074 | goto out_unlock; | 1073 | goto out_unlock; |
1075 | } | 1074 | } |
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 3ce4d9dbdc74..80e5e79b86b0 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c | |||
@@ -182,8 +182,7 @@ int | |||
182 | xfs_reflink_trim_around_shared( | 182 | xfs_reflink_trim_around_shared( |
183 | struct xfs_inode *ip, | 183 | struct xfs_inode *ip, |
184 | struct xfs_bmbt_irec *irec, | 184 | struct xfs_bmbt_irec *irec, |
185 | bool *shared, | 185 | bool *shared) |
186 | bool *trimmed) | ||
187 | { | 186 | { |
188 | xfs_agnumber_t agno; | 187 | xfs_agnumber_t agno; |
189 | xfs_agblock_t agbno; | 188 | xfs_agblock_t agbno; |
@@ -209,7 +208,7 @@ xfs_reflink_trim_around_shared( | |||
209 | if (error) | 208 | if (error) |
210 | return error; | 209 | return error; |
211 | 210 | ||
212 | *shared = *trimmed = false; | 211 | *shared = false; |
213 | if (fbno == NULLAGBLOCK) { | 212 | if (fbno == NULLAGBLOCK) { |
214 | /* No shared blocks at all. */ | 213 | /* No shared blocks at all. */ |
215 | return 0; | 214 | return 0; |
@@ -222,8 +221,6 @@ xfs_reflink_trim_around_shared( | |||
222 | */ | 221 | */ |
223 | irec->br_blockcount = flen; | 222 | irec->br_blockcount = flen; |
224 | *shared = true; | 223 | *shared = true; |
225 | if (flen != aglen) | ||
226 | *trimmed = true; | ||
227 | return 0; | 224 | return 0; |
228 | } else { | 225 | } else { |
229 | /* | 226 | /* |
@@ -233,7 +230,6 @@ xfs_reflink_trim_around_shared( | |||
233 | * start of the shared region. | 230 | * start of the shared region. |
234 | */ | 231 | */ |
235 | irec->br_blockcount = fbno - agbno; | 232 | irec->br_blockcount = fbno - agbno; |
236 | *trimmed = true; | ||
237 | return 0; | 233 | return 0; |
238 | } | 234 | } |
239 | } | 235 | } |
@@ -255,7 +251,7 @@ xfs_reflink_reserve_cow( | |||
255 | struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK); | 251 | struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK); |
256 | struct xfs_bmbt_irec got; | 252 | struct xfs_bmbt_irec got; |
257 | int error = 0; | 253 | int error = 0; |
258 | bool eof = false, trimmed; | 254 | bool eof = false; |
259 | struct xfs_iext_cursor icur; | 255 | struct xfs_iext_cursor icur; |
260 | bool shared; | 256 | bool shared; |
261 | 257 | ||
@@ -277,7 +273,7 @@ xfs_reflink_reserve_cow( | |||
277 | } | 273 | } |
278 | 274 | ||
279 | /* Trim the mapping to the nearest shared extent boundary. */ | 275 | /* Trim the mapping to the nearest shared extent boundary. */ |
280 | error = xfs_reflink_trim_around_shared(ip, imap, &shared, &trimmed); | 276 | error = xfs_reflink_trim_around_shared(ip, imap, &shared); |
281 | if (error) | 277 | if (error) |
282 | return error; | 278 | return error; |
283 | 279 | ||
@@ -366,7 +362,6 @@ xfs_find_trim_cow_extent( | |||
366 | xfs_filblks_t count_fsb = imap->br_blockcount; | 362 | xfs_filblks_t count_fsb = imap->br_blockcount; |
367 | struct xfs_iext_cursor icur; | 363 | struct xfs_iext_cursor icur; |
368 | struct xfs_bmbt_irec got; | 364 | struct xfs_bmbt_irec got; |
369 | bool trimmed; | ||
370 | 365 | ||
371 | *found = false; | 366 | *found = false; |
372 | 367 | ||
@@ -376,7 +371,7 @@ xfs_find_trim_cow_extent( | |||
376 | */ | 371 | */ |
377 | if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, &got) || | 372 | if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, &got) || |
378 | got.br_startoff > offset_fsb) | 373 | got.br_startoff > offset_fsb) |
379 | return xfs_reflink_trim_around_shared(ip, imap, shared, &trimmed); | 374 | return xfs_reflink_trim_around_shared(ip, imap, shared); |
380 | 375 | ||
381 | *shared = true; | 376 | *shared = true; |
382 | if (isnullstartblock(got.br_startblock)) { | 377 | if (isnullstartblock(got.br_startblock)) { |
diff --git a/fs/xfs/xfs_reflink.h b/fs/xfs/xfs_reflink.h index b77f4079022a..7f47202b5639 100644 --- a/fs/xfs/xfs_reflink.h +++ b/fs/xfs/xfs_reflink.h | |||
@@ -10,7 +10,7 @@ extern int xfs_reflink_find_shared(struct xfs_mount *mp, struct xfs_trans *tp, | |||
10 | xfs_agnumber_t agno, xfs_agblock_t agbno, xfs_extlen_t aglen, | 10 | xfs_agnumber_t agno, xfs_agblock_t agbno, xfs_extlen_t aglen, |
11 | xfs_agblock_t *fbno, xfs_extlen_t *flen, bool find_maximal); | 11 | xfs_agblock_t *fbno, xfs_extlen_t *flen, bool find_maximal); |
12 | extern int xfs_reflink_trim_around_shared(struct xfs_inode *ip, | 12 | extern int xfs_reflink_trim_around_shared(struct xfs_inode *ip, |
13 | struct xfs_bmbt_irec *irec, bool *shared, bool *trimmed); | 13 | struct xfs_bmbt_irec *irec, bool *shared); |
14 | 14 | ||
15 | extern int xfs_reflink_reserve_cow(struct xfs_inode *ip, | 15 | extern int xfs_reflink_reserve_cow(struct xfs_inode *ip, |
16 | struct xfs_bmbt_irec *imap); | 16 | struct xfs_bmbt_irec *imap); |