Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263622
b: refs/heads/master
c: 0b04368
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 2, 2011
1 parent 88ce0d0 commit 29d2cda
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d054ac16eeb658bccadb06b12c39cee22243b10f
refs/heads/master: 0b043686fd7136a47d9868e3386cefdc0452018f
8 changes: 8 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,11 @@ Why: In 3.0, we can now autodetect internal 3G device and already have
interface that was used by acer-wmi driver. It will replaced by
information log when acer-wmi initial.
Who: Lee, Chun-Yi <jlee@novell.com>

----------------------------
What: The XFS nodelaylog mount option
When: 3.3
Why: The delaylog mode that has been the default since 2.6.39 has proven
stable, and the old code is in the way of additional improvements in
the log code.
Who: Christoph Hellwig <hch@lst.de>
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/boot/dts/p1023rds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x02000000>;
bank-width = <1>;
bank-width = <2>;
device-width = <1>;
partition@0 {
label = "ramdisk";
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/configs/85xx/p1023rds_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,4 @@ CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
1 change: 1 addition & 0 deletions trunk/arch/powerpc/configs/corenet32_smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,4 @@ CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
5 changes: 4 additions & 1 deletion trunk/arch/powerpc/configs/corenet64_smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ CONFIG_DEBUG_INFO=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_VIRQ_DEBUG=y
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_TALITOS=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
1 change: 1 addition & 0 deletions trunk/arch/powerpc/configs/mpc85xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ CONFIG_SND=y
CONFIG_SND_INTEL8X0=y
# CONFIG_SND_PPC is not set
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=y
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/configs/mpc85xx_smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ CONFIG_SND=y
CONFIG_SND_INTEL8X0=y
# CONFIG_SND_PPC is not set
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=y
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/linear.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ typedef struct dev_info dev_info_t;

struct linear_private_data
{
struct rcu_head rcu;
sector_t array_sectors;
dev_info_t disks[0];
struct rcu_head rcu;
};


Expand Down
16 changes: 13 additions & 3 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
bio->bi_end_io = super_written;

atomic_inc(&mddev->pending_writes);
submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
submit_bio(WRITE_FLUSH_FUA, bio);
}

void md_super_wait(mddev_t *mddev)
Expand Down Expand Up @@ -1738,6 +1738,11 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
sb->level = cpu_to_le32(mddev->level);
sb->layout = cpu_to_le32(mddev->layout);

if (test_bit(WriteMostly, &rdev->flags))
sb->devflags |= WriteMostly1;
else
sb->devflags &= ~WriteMostly1;

if (mddev->bitmap && mddev->bitmap_info.file == NULL) {
sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_info.offset);
sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET);
Expand Down Expand Up @@ -2561,7 +2566,10 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
int err = -EINVAL;
if (cmd_match(buf, "faulty") && rdev->mddev->pers) {
md_error(rdev->mddev, rdev);
err = 0;
if (test_bit(Faulty, &rdev->flags))
err = 0;
else
err = -EBUSY;
} else if (cmd_match(buf, "remove")) {
if (rdev->raid_disk >= 0)
err = -EBUSY;
Expand All @@ -2584,7 +2592,7 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
err = 0;
} else if (cmd_match(buf, "-blocked")) {
if (!test_bit(Faulty, &rdev->flags) &&
test_bit(BlockedBadBlocks, &rdev->flags)) {
rdev->badblocks.unacked_exist) {
/* metadata handler doesn't understand badblocks,
* so we need to fail the device
*/
Expand Down Expand Up @@ -5983,6 +5991,8 @@ static int set_disk_faulty(mddev_t *mddev, dev_t dev)
return -ENODEV;

md_error(mddev, rdev);
if (!test_bit(Faulty, &rdev->flags))
return -EBUSY;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3336,7 +3336,7 @@ static void handle_stripe(struct stripe_head *sh)

finish:
/* wait for this device to become unblocked */
if (unlikely(s.blocked_rdev))
if (conf->mddev->external && unlikely(s.blocked_rdev))
md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev);

if (s.handle_bad_blocks)
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ struct mpage_da_data {
*/
#define EXT4_IO_END_UNWRITTEN 0x0001
#define EXT4_IO_END_ERROR 0x0002
#define EXT4_IO_END_QUEUED 0x0004

struct ext4_io_page {
struct page *p_page;
Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ void ext4_evict_inode(struct inode *inode)

trace_ext4_evict_inode(inode);

mutex_lock(&inode->i_mutex);
ext4_flush_completed_IO(inode);
mutex_unlock(&inode->i_mutex);
ext4_ioend_wait(inode);

if (inode->i_nlink) {
Expand Down
18 changes: 17 additions & 1 deletion trunk/fs/ext4/page-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,23 @@ static void ext4_end_io_work(struct work_struct *work)
unsigned long flags;
int ret;

mutex_lock(&inode->i_mutex);
if (!mutex_trylock(&inode->i_mutex)) {
/*
* Requeue the work instead of waiting so that the work
* items queued after this can be processed.
*/
queue_work(EXT4_SB(inode->i_sb)->dio_unwritten_wq, &io->work);
/*
* To prevent the ext4-dio-unwritten thread from keeping
* requeueing end_io requests and occupying cpu for too long,
* yield the cpu if it sees an end_io request that has already
* been requeued.
*/
if (io->flag & EXT4_IO_END_QUEUED)
yield();
io->flag |= EXT4_IO_END_QUEUED;
return;
}
ret = ext4_end_io_nolock(io);
if (ret < 0) {
mutex_unlock(&inode->i_mutex);
Expand Down
14 changes: 11 additions & 3 deletions trunk/fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ xfs_synchronize_times(
}

/*
* If the linux inode is valid, mark it dirty.
* Used when committing a dirty inode into a transaction so that
* the inode will get written back by the linux code
* If the linux inode is valid, mark it dirty, else mark the dirty state
* in the XFS inode to make sure we pick it up when reclaiming the inode.
*/
void
xfs_mark_inode_dirty_sync(
Expand All @@ -82,6 +81,10 @@ xfs_mark_inode_dirty_sync(

if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
mark_inode_dirty_sync(inode);
else {
barrier();
ip->i_update_core = 1;
}
}

void
Expand All @@ -92,6 +95,11 @@ xfs_mark_inode_dirty(

if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
mark_inode_dirty(inode);
else {
barrier();
ip->i_update_core = 1;
}

}

/*
Expand Down
36 changes: 11 additions & 25 deletions trunk/fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ xfs_parseargs(
mp->m_flags |= XFS_MOUNT_DELAYLOG;
} else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) {
mp->m_flags &= ~XFS_MOUNT_DELAYLOG;
xfs_warn(mp,
"nodelaylog is deprecated and will be removed in Linux 3.3");
} else if (!strcmp(this_char, MNTOPT_DISCARD)) {
mp->m_flags |= XFS_MOUNT_DISCARD;
} else if (!strcmp(this_char, MNTOPT_NODISCARD)) {
Expand Down Expand Up @@ -877,33 +879,17 @@ xfs_log_inode(
struct xfs_trans *tp;
int error;

xfs_iunlock(ip, XFS_ILOCK_SHARED);
tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0);

if (error) {
xfs_trans_cancel(tp, 0);
/* we need to return with the lock hold shared */
xfs_ilock(ip, XFS_ILOCK_SHARED);
return error;
}

xfs_ilock(ip, XFS_ILOCK_EXCL);

/*
* Note - it's possible that we might have pushed ourselves out of the
* way during trans_reserve which would flush the inode. But there's
* no guarantee that the inode buffer has actually gone out yet (it's
* delwri). Plus the buffer could be pinned anyway if it's part of
* an inode in another recent transaction. So we play it safe and
* fire off the transaction anyway.
*/
xfs_trans_ijoin(tp, ip);
xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
error = xfs_trans_commit(tp, 0);
xfs_ilock_demote(ip, XFS_ILOCK_EXCL);

return error;
return xfs_trans_commit(tp, 0);
}

STATIC int
Expand All @@ -918,7 +904,9 @@ xfs_fs_write_inode(
trace_xfs_write_inode(ip);

if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO);
return -XFS_ERROR(EIO);
if (!ip->i_update_core)
return 0;

if (wbc->sync_mode == WB_SYNC_ALL) {
/*
Expand All @@ -929,12 +917,10 @@ xfs_fs_write_inode(
* of synchronous log foces dramatically.
*/
xfs_ioend_wait(ip);
xfs_ilock(ip, XFS_ILOCK_SHARED);
if (ip->i_update_core) {
error = xfs_log_inode(ip);
if (error)
goto out_unlock;
}
error = xfs_log_inode(ip);
if (error)
goto out;
return 0;
} else {
/*
* We make this non-blocking if the inode is contended, return
Expand Down

0 comments on commit 29d2cda

Please sign in to comment.