tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
Linus Torvalds
20 years ago
4ad5bd25
cd0cca7b
+31
-38
6 changed files
expand all
collapse all
unified
split
fs
xfs
linux-2.6
xfs_aops.c
xfs_attr_leaf.c
xfs_fsops.c
xfs_iomap.h
xfs_log_priv.h
xfs_vnodeops.c
+6
-7
fs/xfs/linux-2.6/xfs_aops.c
···
941
941
int retpbbm = 1;
942
942
int error;
943
943
944
944
-
if (blocks) {
945
945
-
offset = blocks << inode->i_blkbits; /* 64 bit goodness */
946
946
-
size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX);
947
947
-
} else {
948
948
-
size = 1 << inode->i_blkbits;
949
949
-
}
950
944
offset = (xfs_off_t)iblock << inode->i_blkbits;
945
945
+
if (blocks)
946
946
+
size = (ssize_t) min_t(xfs_off_t, LONG_MAX,
947
947
+
(xfs_off_t)blocks << inode->i_blkbits);
948
948
+
else
949
949
+
size = 1 << inode->i_blkbits;
951
950
952
951
VOP_BMAP(vp, offset, size,
953
952
create ? flags : BMAPI_READ, &iomap, &retpbbm, error);
···
1006
1007
ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
1007
1008
offset = min_t(xfs_off_t,
1008
1009
iomap.iomap_bsize - iomap.iomap_delta,
1009
1009
-
blocks << inode->i_blkbits);
1010
1010
+
(xfs_off_t)blocks << inode->i_blkbits);
1010
1011
bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset);
1011
1012
}
1012
1013
+8
-3
fs/xfs/xfs_attr_leaf.c
···
310
310
* Fix up the start offset of the attribute fork
311
311
*/
312
312
totsize -= size;
313
313
-
if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname) {
313
313
+
if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname &&
314
314
+
!(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {
314
315
/*
315
316
* Last attribute now removed, revert to original
316
317
* inode format making all literal area available
···
329
328
xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
330
329
dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
331
330
ASSERT(dp->i_d.di_forkoff);
332
332
-
ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname);
331
331
+
ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname ||
332
332
+
(mp->m_flags & XFS_MOUNT_COMPAT_ATTR));
333
333
dp->i_afp->if_ext_max =
334
334
XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t);
335
335
dp->i_df.if_ext_max =
···
739
737
+ name_loc->namelen
740
738
+ INT_GET(name_loc->valuelen, ARCH_CONVERT);
741
739
}
742
742
-
if (bytes == sizeof(struct xfs_attr_sf_hdr))
740
740
+
if (!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR) &&
741
741
+
(bytes == sizeof(struct xfs_attr_sf_hdr)))
743
742
return(-1);
744
743
return(xfs_attr_shortform_bytesfit(dp, bytes));
745
744
}
···
778
775
goto out;
779
776
780
777
if (forkoff == -1) {
778
778
+
ASSERT(!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR));
779
779
+
781
780
/*
782
781
* Last attribute was removed, revert to original
783
782
* inode format making all literal area available
+1
-1
fs/xfs/xfs_fsops.c
···
550
550
struct vfs *vfsp = XFS_MTOVFS(mp);
551
551
struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
552
552
553
553
-
if (sb) {
553
553
+
if (sb && !IS_ERR(sb)) {
554
554
xfs_force_shutdown(mp, XFS_FORCE_UMOUNT);
555
555
thaw_bdev(sb->s_bdev, sb);
556
556
}
+1
-1
fs/xfs/xfs_iomap.h
···
69
69
xfs_buftarg_t *iomap_target;
70
70
xfs_off_t iomap_offset; /* offset of mapping, bytes */
71
71
xfs_off_t iomap_bsize; /* size of mapping, bytes */
72
72
-
size_t iomap_delta; /* offset into mapping, bytes */
72
72
+
xfs_off_t iomap_delta; /* offset into mapping, bytes */
73
73
iomap_flags_t iomap_flags;
74
74
} xfs_iomap_t;
75
75
+12
-24
fs/xfs/xfs_log_priv.h
···
494
494
495
495
#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR)
496
496
497
497
-
#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \
498
498
-
xlog_grant_sub_space(log,bytes,type)
499
499
-
static inline void xlog_grant_sub_space(struct log *log, int bytes, int type)
500
500
-
{
497
497
+
#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \
498
498
+
{ \
501
499
if (type == 'w') { \
502
500
(log)->l_grant_write_bytes -= (bytes); \
503
501
if ((log)->l_grant_write_bytes < 0) { \
···
509
511
(log)->l_grant_reserve_cycle--; \
510
512
} \
511
513
} \
512
512
-
}
513
513
-
514
514
-
#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \
515
515
-
xlog_grant_add_space(log,bytes,type)
516
516
-
static inline void
517
517
-
xlog_grant_add_space(struct log *log, int bytes, int type)
518
518
-
{
514
514
+
}
515
515
+
#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \
516
516
+
{ \
519
517
if (type == 'w') { \
520
518
(log)->l_grant_write_bytes += (bytes); \
521
519
if ((log)->l_grant_write_bytes > (log)->l_logsize) { \
···
525
531
(log)->l_grant_reserve_cycle++; \
526
532
} \
527
533
} \
528
528
-
}
529
529
-
530
530
-
#define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic)
531
531
-
static inline void
532
532
-
xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
533
533
-
{ \
534
534
+
}
535
535
+
#define XLOG_INS_TICKETQ(q, tic) \
536
536
+
{ \
534
537
if (q) { \
535
538
(tic)->t_next = (q); \
536
539
(tic)->t_prev = (q)->t_prev; \
···
538
547
(q) = (tic); \
539
548
} \
540
549
(tic)->t_flags |= XLOG_TIC_IN_Q; \
541
541
-
}
542
542
-
543
543
-
#define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic)
544
544
-
static inline void
545
545
-
xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
546
546
-
{ \
550
550
+
}
551
551
+
#define XLOG_DEL_TICKETQ(q, tic) \
552
552
+
{ \
547
553
if ((tic) == (tic)->t_next) { \
548
554
(q) = NULL; \
549
555
} else { \
···
550
562
} \
551
563
(tic)->t_next = (tic)->t_prev = NULL; \
552
564
(tic)->t_flags &= ~XLOG_TIC_IN_Q; \
553
553
-
}
565
565
+
}
554
566
555
567
/* common routines */
556
568
extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp);
+3
-2
fs/xfs/xfs_vnodeops.c
···
3958
3958
}
3959
3959
}
3960
3960
XFS_MOUNT_IUNLOCK(mp);
3961
3961
-
xfs_finish_reclaim(ip, noblock,
3962
3962
-
XFS_IFLUSH_DELWRI_ELSE_ASYNC);
3961
3961
+
if (xfs_finish_reclaim(ip, noblock,
3962
3962
+
XFS_IFLUSH_DELWRI_ELSE_ASYNC))
3963
3963
+
delay(1);
3963
3964
purged = 1;
3964
3965
break;
3965
3966
}