Access to NVDIMM JEDEC registers
by Brian Stark
Where can I find documentation on accessing NVDIMM JEDEC registers, for
example if I want to read page 0 offset 0x80 (defined to be CSAVE_INFO in
the JEDEC specification. How do I do this through Linux given that the
BIOS has locked the chipset?
Brian
--
CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use
by the addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail message, you are hereby notified that any dissemination,
distribution or copying of this e-mail message, and any attachments
thereto, is strictly prohibited. If you have received this e-mail message
in error, please immediately notify the sender and permanently delete the
original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT
INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the Uniform
Electronic Transactions Act or the applicability of any other law of
similar substance and effect, absent an express statement to the contrary
hereinabove, this e-mail message its contents, and any attachments hereto
are not intended to represent an offer or acceptance to enter into a
contract and are not otherwise intended to bind the sender, Sanmina
Corporation (or any of its subsidiaries), or any other person or entity.
4 years, 10 months
[PATCH] acpi, nfit: add support for the _LSI, _LSR, and _LSW label methods
by Dan Williams
ACPI 6.2 adds support for named methods to access the label storage area
of an NVDIMM. We prefer these new methods if available and otherwise
fallback to the NVDIMM_FAMILY_INTEL _DSMs. The kernel ioctls,
ND_IOCTL_{GET,SET}_CONFIG_{SIZE,DATA}, remain generic and the driver
translates the 'package' payloads into the NVDIMM_FAMILY_INTEL 'buffer'
format to maintain compatibility with existing userspace and keep the
output buffer parsing code in the driver common.
The output payloads are mostly compatible save for the 'label area
locked' status that moves from the 'config_size' (_LSI) command to the
'config_read' (_LSR) command status.
Cc: Jeff Moyer <jmoyer(a)redhat.com>
Cc: Johannes Thumshirn <jthumshirn(a)suse.de>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
drivers/acpi/nfit/core.c | 213 +++++++++++++++++++++++++++++++++++++++++++++-
drivers/acpi/nfit/nfit.h | 3 +
drivers/nvdimm/dimm.c | 2
3 files changed, 214 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 3369bb8fd9ba..ebe0857ac346 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -183,13 +183,33 @@ static int xlat_bus_status(void *buf, unsigned int cmd, u32 status)
return 0;
}
-static int xlat_nvdimm_status(void *buf, unsigned int cmd, u32 status)
+#define ACPI_LABELS_LOCKED 3
+
+static int xlat_nvdimm_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd,
+ u32 status)
{
+ struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
+
switch (cmd) {
case ND_CMD_GET_CONFIG_SIZE:
+ /*
+ * In the _LSI, _LSR, _LSW case the locked status is
+ * communicated via the read/write commands
+ */
+ if (nfit_mem->has_lsi)
+ break;
+
if (status >> 16 & ND_CONFIG_LOCKED)
return -EACCES;
break;
+ case ND_CMD_GET_CONFIG_DATA:
+ if (nfit_mem->has_lsr && status == ACPI_LABELS_LOCKED)
+ return -EACCES;
+ break;
+ case ND_CMD_SET_CONFIG_DATA:
+ if (nfit_mem->has_lsw && status == ACPI_LABELS_LOCKED)
+ return -EACCES;
+ break;
default:
break;
}
@@ -205,13 +225,156 @@ static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd,
{
if (!nvdimm)
return xlat_bus_status(buf, cmd, status);
- return xlat_nvdimm_status(buf, cmd, status);
+ return xlat_nvdimm_status(nvdimm, buf, cmd, status);
+}
+
+/* convert _LS{I,R} packages to the buffer object acpi_nfit_ctl expects */
+static union acpi_object *pkg_to_buf(union acpi_object *pkg)
+{
+ int i;
+ void *dst;
+ size_t size = 0;
+ union acpi_object *buf = NULL;
+
+ if (pkg->type != ACPI_TYPE_PACKAGE) {
+ WARN_ONCE(1, "BIOS bug, unexpected element type: %d\n",
+ pkg->type);
+ goto err;
+ }
+
+ for (i = 0; i < pkg->package.count; i++) {
+ union acpi_object *obj = &pkg->package.elements[i];
+
+ if (obj->type == ACPI_TYPE_INTEGER)
+ size += 4;
+ else if (obj->type == ACPI_TYPE_BUFFER)
+ size += obj->buffer.length;
+ else {
+ WARN_ONCE(1, "BIOS bug, unexpected element type: %d\n",
+ obj->type);
+ goto err;
+ }
+ }
+
+ buf = ACPI_ALLOCATE(sizeof(*buf) + size);
+ if (!buf)
+ goto err;
+
+ dst = buf + 1;
+ buf->type = ACPI_TYPE_BUFFER;
+ buf->buffer.length = size;
+ buf->buffer.pointer = dst;
+ for (i = 0; i < pkg->package.count; i++) {
+ union acpi_object *obj = &pkg->package.elements[i];
+
+ if (obj->type == ACPI_TYPE_INTEGER) {
+ memcpy(dst, &obj->integer.value, 4);
+ dst += 4;
+ } else if (obj->type == ACPI_TYPE_BUFFER) {
+ memcpy(dst, obj->buffer.pointer, obj->buffer.length);
+ dst += obj->buffer.length;
+ }
+ }
+err:
+ ACPI_FREE(pkg);
+ return buf;
+}
+
+static union acpi_object *int_to_buf(union acpi_object *integer)
+{
+ union acpi_object *buf = ACPI_ALLOCATE(sizeof(*buf) + 4);
+ void *dst = NULL;
+
+ if (!buf)
+ goto err;
+
+ if (integer->type != ACPI_TYPE_INTEGER) {
+ WARN_ONCE(1, "BIOS bug, unexpected element type: %d\n",
+ integer->type);
+ goto err;
+ }
+
+ dst = buf + 1;
+ buf->type = ACPI_TYPE_BUFFER;
+ buf->buffer.length = 4;
+ buf->buffer.pointer = dst;
+ memcpy(dst, &integer->integer.value, 4);
+err:
+ ACPI_FREE(integer);
+ return buf;
+}
+
+static union acpi_object *acpi_label_write(acpi_handle handle, u32 offset,
+ u32 len, void *data)
+{
+ acpi_status rc;
+ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
+ struct acpi_object_list input = {
+ .count = 3,
+ .pointer = (union acpi_object []) {
+ [0] = {
+ .integer.type = ACPI_TYPE_INTEGER,
+ .integer.value = offset,
+ },
+ [1] = {
+ .integer.type = ACPI_TYPE_INTEGER,
+ .integer.value = len,
+ },
+ [2] = {
+ .buffer.type = ACPI_TYPE_BUFFER,
+ .buffer.pointer = data,
+ .buffer.length = len,
+ },
+ },
+ };
+
+ rc = acpi_evaluate_object(handle, "_LSW", &input, &buf);
+ if (ACPI_FAILURE(rc))
+ return NULL;
+ return int_to_buf(buf.pointer);
+}
+
+static union acpi_object *acpi_label_read(acpi_handle handle, u32 offset,
+ u32 len)
+{
+ acpi_status rc;
+ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
+ struct acpi_object_list input = {
+ .count = 2,
+ .pointer = (union acpi_object []) {
+ [0] = {
+ .integer.type = ACPI_TYPE_INTEGER,
+ .integer.value = offset,
+ },
+ [1] = {
+ .integer.type = ACPI_TYPE_INTEGER,
+ .integer.value = len,
+ },
+ },
+ };
+
+ rc = acpi_evaluate_object(handle, "_LSR", &input, &buf);
+ if (ACPI_FAILURE(rc))
+ return NULL;
+ return pkg_to_buf(buf.pointer);
+}
+
+static union acpi_object *acpi_label_info(acpi_handle handle)
+{
+ acpi_status rc;
+ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
+
+ rc = acpi_evaluate_object(handle, "_LSI", NULL, &buf);
+ if (ACPI_FAILURE(rc))
+ return NULL;
+ return pkg_to_buf(buf.pointer);
}
int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc)
{
struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc);
+ struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
union acpi_object in_obj, in_buf, *out_obj;
const struct nd_cmd_desc *desc = NULL;
struct device *dev = acpi_desc->dev;
@@ -235,7 +398,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
}
if (nvdimm) {
- struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
struct acpi_device *adev = nfit_mem->adev;
if (!adev)
@@ -294,7 +456,21 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
in_buf.buffer.pointer,
min_t(u32, 256, in_buf.buffer.length), true);
- out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
+ /* call the BIOS, prefer the named methods over _DSM if available */
+ if (cmd == ND_CMD_GET_CONFIG_SIZE && nfit_mem->has_lsi)
+ out_obj = acpi_label_info(handle);
+ else if (cmd == ND_CMD_GET_CONFIG_DATA && nfit_mem->has_lsr) {
+ struct nd_cmd_get_config_data_hdr *p = buf;
+
+ out_obj = acpi_label_read(handle, p->in_offset, p->in_length);
+ } else if (cmd == ND_CMD_SET_CONFIG_DATA && nfit_mem->has_lsw) {
+ struct nd_cmd_set_config_hdr *p = buf;
+
+ out_obj = acpi_label_write(handle, p->in_offset, p->in_length,
+ p->in_buf);
+ } else
+ out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
+
if (!out_obj) {
dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
cmd_name);
@@ -1431,6 +1607,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
{
struct acpi_device *adev, *adev_dimm;
struct device *dev = acpi_desc->dev;
+ union acpi_object *obj;
unsigned long dsm_mask;
const guid_t *guid;
int i;
@@ -1496,6 +1673,27 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
if (acpi_check_dsm(adev_dimm->handle, guid, 1, 1ULL << i))
set_bit(i, &nfit_mem->dsm_mask);
+ obj = acpi_label_info(adev_dimm->handle);
+ if (obj) {
+ ACPI_FREE(obj);
+ nfit_mem->has_lsi = 1;
+ dev_dbg(dev, "%s: has _LSI\n", dev_name(&adev_dimm->dev));
+ }
+
+ obj = acpi_label_read(adev_dimm->handle, 0, 0);
+ if (obj) {
+ ACPI_FREE(obj);
+ nfit_mem->has_lsr = 1;
+ dev_dbg(dev, "%s: has _LSR\n", dev_name(&adev_dimm->dev));
+ }
+
+ obj = acpi_label_write(adev_dimm->handle, 0, 0, NULL);
+ if (obj) {
+ ACPI_FREE(obj);
+ nfit_mem->has_lsw = 1;
+ dev_dbg(dev, "%s: has _LSW\n", dev_name(&adev_dimm->dev));
+ }
+
return 0;
}
@@ -1574,6 +1772,13 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
if (nfit_mem->family == NVDIMM_FAMILY_INTEL)
cmd_mask |= nfit_mem->dsm_mask;
+ if (nfit_mem->has_lsi)
+ set_bit(ND_CMD_GET_CONFIG_SIZE, &cmd_mask);
+ if (nfit_mem->has_lsr)
+ set_bit(ND_CMD_GET_CONFIG_DATA, &cmd_mask);
+ if (nfit_mem->has_lsw)
+ set_bit(ND_CMD_SET_CONFIG_DATA, &cmd_mask);
+
flush = nfit_mem->nfit_flush ? nfit_mem->nfit_flush->flush
: NULL;
nvdimm = nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem,
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index f2c6380bdbb2..3976d649f27c 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -140,6 +140,9 @@ struct nfit_mem {
struct resource *flush_wpq;
unsigned long dsm_mask;
int family;
+ u32 has_lsi:1;
+ u32 has_lsr:1;
+ u32 has_lsw:1;
};
struct acpi_nfit_desc {
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c
index e0f0e3ce1a32..862bcbd96366 100644
--- a/drivers/nvdimm/dimm.c
+++ b/drivers/nvdimm/dimm.c
@@ -55,6 +55,8 @@ static int nvdimm_probe(struct device *dev)
goto err;
rc = nvdimm_init_config_data(ndd);
+ if (rc == -EACCES)
+ nvdimm_set_locked(dev);
if (rc)
goto err;
4 years, 10 months
转发:企业必备的劳动法应对体系
by 程斗
发 件 人:"程斗" <oxbxol(a)wdjfiv.com>
收 件 人:"linux-nvdimm" <linux-nvdimm(a)lists.01.org>;
发送时间:2017-9-25 13:46:13
课程信息:
新《劳动合同法》、《社会保险法》、《工伤保险条例》实操应对策与有效调岗调薪、裁员解雇及违纪问题员工处理技
注明:该课程2天为一个单元,A单元与B单元内容是完全独立的不分先后顺序,客户可根据自己需求选择参加A单元或者B单元,或AB单元均参加,可以参加完A单元再参加B单元或者先参加B单元再参加A单元均可!
详细 课程时间安排 及 联系方式 请查阅 附件内容
课 程 特 色:
稀缺性:此课程将劳动法体系和薪酬绩效管理体系紧密相结合,国内极少出现此类课程。
针对性:课程内容精选了过去5年来主讲老师亲自处理过的且在不少用人单位内部也曾发生过的代表性案例,这些案例完全符合中国现阶段的大环境、大气候、大趋势,极具参考性和启发性。
实战性:实战沙盘演练,学员深入思考与充分互动,老师毫不保留倾囊相授;学员把错误留在课堂,把正确的观点、方法、工具、技能带回去。
课 程 收 益:
1、全面了解劳动用工过程的法律风险;
2、理解与劳动用工有关的政策法律法规;
3、培养预测、分析劳动用工法律风险的思维;
4、掌握预防和应对风险的实战技能及方法工具……
课 程 大 纲:
A单元内容(共2天,20个以上经典案例)
专题一:招聘入职
1.如何预防劳动者的“应聘欺诈”,如何证明劳动者的“欺诈”?
2.招收应届毕业生,应注意哪些细节问题?
3.招用达到法定退休年龄的人员,应注意哪些细节问题?
4.招用待岗、内退、停薪留职的人员,应注意哪些细节问题?
5.入职体检需注意哪些细节问题?
6.入职前后用人单位应告知劳动者哪些情况,如何保留证据?
7.《入职登记表》如何设计,才能起到预防法律风险的作用?
8.劳动者无法提交《离职证明》,该怎么办?
9.企业如何书写《录用通知书》,其法律风险有哪些?
专题二:劳动合同订立
1.用人单位自行拟定的劳动合同文本是否有效,是否需要进行备案?
2.劳动者借故拖延或拒绝签订劳动合同,用人单位如何应对?
3.未签订劳动合同,需支付多长期限的双倍工资?是否受到仲裁时效的限制?
4.劳动合同期满,继续留用劳动者,但未续签合同,是否也需支付双倍工资?
5.什么时候为最佳时间,签署劳动合同、用工协议?
6.法律禁止2次约定试用期,劳动合同期限和试用期限该如何约定?
7.用人单位收购其他组织时,如何与被接收的员工签订、变更劳动合同?
8.应否与属于职业经理人的法人代表签订劳动合同?
专题三:试用期
1.可否先试用后签合同,可否单独签订试用期协议?
2.员工主动申请延长试用期,该怎样操作,才规避赔偿风险?
3.试用期满后辞退员工,最少赔2个月工资,该如何化解?
4.试用期最后一天辞退员工,赔偿概率为70%,如何化解?
5.试用期满前几天辞退员工,赔偿概率为50%,如何化解?
6.不符合录用条件的范围包括哪些,如何取证证明?
7.《试用期辞退通知书》如何书写,以避免违法解除的赔偿金?
8.出现“经济性裁员”情况,优先裁掉试用期的新员工,合法吗?
9.试用期员工经常请假休假,导致难以对其观察考核,如何处理?
专题四:无固定期限劳动合同
1.无固定期限劳动合同到底是不是铁饭碗,会不会增加企业成本?
2.无固定期限劳动合同解除的条件、理由有哪些?
3.用人单位拒绝签订无固定期限劳动合同,有何风险?
4.签订了固定期限劳动合同的员工,期间工作累计满10年,能否要求将固定期限合同变更为无固定期限合同?
5.连续订立二次固定期限劳动合同到期,用人单位能否终止合同;员工提出签订无固定期限合同,用人单位能否拒绝?
6.合同期满劳动者由于医疗期、三期等原因续延劳动合同导致劳动者连续工作满十年,劳动者提出订立无固定期限劳动合同的,用人单位能否拒绝?
专题五:培训、保密与竞业限制
1.培训服务期与劳动合同期限有何不同,劳动合同期限与服务期限发生冲突时如何适用?
2.培训服务期未到期,而劳动合同到期,用人单位终止劳动合同的,是否属于提前解除劳动合同,如何规避?
3.劳动者严重过错被解雇,用人单位能否依据服务期约定要求劳动者支付违约金?
4.在什么情况下,可签署竞业限制协议?
5.在什么时候,企业更有主动权签署竞业限制协议?
6.无约定经济补偿的支付,竞业限制是否有效?
7.竞业限制的经济补偿的标准如何界定?
8.要求员工保密,企业需要支付保密工资吗?
9.培训协议、保密协议、竞业限制协议的核心条款!
专题六:劳动关系解除终止
1.双方协商解除劳动合同并约定支付适当的经济补偿,事后劳动者追讨经济补偿的差额部分,仲裁机构有可能支持劳动者的诉求,企业如何避免案件败诉?
2.能否与“三期妇女、特殊保护期间的员工”协商解除,如何规避风险?
3.员工未提前30日通知企业即自行离职,企业能否扣减其工资?
4.员工提交辞职信后的30天内,企业批准其离职,可能有风险,如何化解?
5.员工提交辞职信后的30天后,企业批准其离职,也可能有风险,如何化解?
6.对于患病员工,能否解除,如何操作才能降低法律风险?
7.实行末位淘汰制,以末位排名为由解雇员工,往往被认定非法解雇,企业该如何做,才避免案件败诉?
8.以“组织架构调整,无合适岗位安排”为由解雇员工,感觉非常符合常理,但往往被认定非法解雇,企业该如何做才避免风险?
9.以“经济性裁员”名义解雇员工,感觉非常符合常理,但往往被认定非法解雇,企业该如何操作?
10.《解除劳动合同通知书》如果表述不当,往往成为劳动者打赢官司的有力证据,企业该如何书写,才避免案件败诉而承担法律责任?
11.解除劳动合同前未通知及征求工会的意见,是否构成非法解除?
12.劳动合同到期后,经常出现该终止的忘记办理终止手续,该续签的忘记办理续签手续,其引发的风险非常大;那么企业该如何规避风险?
专题七:社会保险法
1.用人单位拖欠社保费,有什么法律责任?
2.用人单位不足额缴纳社会保险如何处理?
3.员工不愿意买社保,并与单位签有协议的情况下,该协议是否有效?
4.试用期间,是否必须缴纳社会保险?
5.如果无参保,劳动者因第三方责任产生的医疗费用,能否要求单位报销?
6.企业协助辞职员工骗取失业保险金,有什么法律风险?
7.女职工未婚先孕、未婚生育争议如何处理?
8.怀孕女职工提出长期休假保胎,直至修完产假,该如何协调此问题?
专题八:劳动争议处理
1.用人单位败诉的原因主要有哪些?
2.仲裁或法院在处理案件时,如何适用法律法规?
3.如何判定政策法律法规的效力等级?
4.公开审理的开庭形式,有何风险,如何避免风险?
5.申请仲裁的时效如何计算;如何理解“劳动争议发生之日”?
6.如何书写答辩书,有哪些注意事项?
7.开庭期间,质证与辩论需要注意哪些关键问题?
8.举证责任如何分配,无法举证的后果有哪些?
B单元内容(共2天,20个以上经典案例)
专题一:违纪违规问题员工处理
1.劳动者往往拒绝签收处分、解雇通知书,如何应对?
2.问题员工往往拒绝提交《检讨书》或否认违纪违规事实,企业该如何收集证据?
3.对于违纪员工,应该在什么时间内处理?
4.怎样理解“严重违反用人单位的规章制度”?
5.如何在《惩罚条例》中描述“一般违纪”、“较重违纪”及“严重违纪”?
6.怎样理解与操作“严重失职,营私舞弊,给用人单位造成重大损害”?
7.如何界定“重大损害”,“重大损害”是否必须体现为造成直接的经济损失?
8.如何追究“严重失职、严重违纪违规”者的法律责任?
9.能否直接规定“禁止兼职,否则视为严重违纪违规”?
10.直线部门经理擅自口头辞退员工,仲裁机构往往认定企业非法解雇,企业该如何做,才避免案件败诉?
11.劳动者不辞而别、无故旷工,却主张被企业口头解雇,往往得到仲裁机构的支持,企业该如何做,才避免案件败诉?
12.“录音录象”证据,仲裁与法院是否采信;企业内部OA系统上的资料能否作为证据使用;电子邮件、手机短信能否作为证据使用?
专题二:绩效管理与岗位调整
1.企业单方调整岗位,员工往往可被迫解除合同并索赔经济补偿,如何规避?
2.调岗时没有书面确认,员工到新岗位工作2个月后能否要求恢复到原岗位?
3.可否对“三期内”女职工进行调岗、调薪?
4.员工认同绩效结果,为什么在“不胜任工作”引发的争议中还是败诉?
5.为什么企业根据绩效结果支付员工绩效奖金,最终被认定非法克扣工资?
6.法律上如何证明劳动者“不能胜任工作”?
7.对绩效考核不合格的员工,如何合法辞退?
8.绩效正态分布往往强制划分5%的员工为不合格者,是否合法?
专题三:劳动报酬、薪酬福利
1.工资总额包括哪些工资明细?
2.新进员工薪资管理问题及处理技巧;
3.调整工作岗位后,如何单方调薪、降薪?
4.如何通过薪酬调整处理员工失职、违纪等问题?
5.值班算不算加班,如何防范风险?
6.加班加点工资支付常见误区?
7.用人单位如何设计工资构成以降低加班费成本?
8.未经用人单位安排,劳动者自行加班的,是否需支付加班工资?
9.劳动者主张入职以来的加班费,如何应对?
10.劳动者在工作日\法定节假日加班,能否安排补休而不予支付加班费?
11.病假、年休假、婚假、产假、丧假等的享受条件及工资待遇标准?
12.离职员工往往回头追讨年终奖,有可能得到支持,如何规避该风险?
专题四:经济补偿
1.用人单位需向劳动者支付经济补偿的情形有哪些?
2.什么情况下用人单位需支付两倍的经济补偿?
3.劳动者可否同时向用人单位主张经济补偿和赔偿金?
4.经济补偿计算的基数及标准如何确定?
5.经济补偿年限最高不超过十二年的适用范围?
6.如何计算《劳动合同法》生效前后的经济补偿年限?
7.如何理解“六个月以上不满一年的,按一年计算;不满六个月的,向劳动者支付半个月工资的经济补偿”?
8.劳动合同法环境下“50%额外经济补偿金”是否继续适用?
专题五:规章制度、员工手册
1.企业人力资源、劳动用工管理制度常见的误区有哪些?
2.人力资源、劳动用工管理制度应该包括哪些必备内容?
3.制定规章制度的程序要求给用人单位带来哪些风险,如何应对?
4.非国有用人单位如何组建“职工代表大会”?
5.无纸化、网络化办公下的公示,存在哪些风险?
6.如何公示或告知,更符合仲裁或诉讼的举证要求?
7.规章制度能否规定对员工进行经济处罚?
8.规章制度违反法律法规,劳动者可以被迫解除并索取经济补偿,如何防范?
9.规章制度与员工手册到底有什么区别?
10.规章制度与员工手册应该多长时间修改一次?
专题六:工伤保险条例
1.属于工伤范围的情形有哪些?
2.不得认定为工伤的情形有哪些?
3.怎样理解“上下班途中”,怎样控制期间的风险?
4.发生工伤事故,用人单位需承担哪些费用?
5.工伤员工借故拒绝复工,借故不断休假,如何处理?
6.对于第三方造成的工伤事故,劳动者能否要求用人单位支付工伤待遇又同时要求第三方支付人身伤害赔偿?
7.用人单位能否以商业保险理赔款替代职工工伤赔偿待遇?
8.发生工伤事故,双方私下和解,补偿协议该如何签订才有效?
专题七:劳务派遣
1.新法下劳务派遣面临的主要风险有哪些?
2.劳务派遣合作协议必须注意的风险细节有哪些?
3.派遣工“第三签”时,能否要求签订无固定期限劳动合同?
4.哪些岗位可以使用派遣工,辅助性、临时性、替代性如何理解与操作?
5.新规定对于同工同酬提出哪些新要求,如何规避同工同酬风险?
6.采用劳务派遣用工方式,能否异地参保?
7.用工单位如何行使对派遣员工的退还或退换权?
8.怎样规定派遣员工的辞职程序和离职责任?
9.部分劳务公司很可能面临关闭停业,原来的派遣工的劳动关系如何处理?
10.业务外包与劳务派遣的本质区别有哪些?
11.用工单位如何应对派遣合作争议和劳动争议?
【授_课_专_家_介_绍】资_深_劳_动_法_专_家 钟永棣
国内著名劳动法与员工关系管理实战专家、劳动仲裁员、企业劳动争议预防应对专家、高级人力资源管理师、高级劳动关系协调师,国内第一批倡导、传播、实施“国家劳动法与企业薪酬绩效有机整合”的先行者;国内原创型、实战型、顾问型的培训师。
现任“劳律通(中国)顾问中心”,上海成通律师事务所投资合伙人;兼任深圳外商投资企业协会、广州市劳动保障学会、广州市人力资源市场服务中心、广东省人力资源管理协会、香港工业总会、中山大学、浙江大学、华南理工大学等100多家培训公司、行业协会、有关机构的签约讲师、特聘专家顾问。
钟老师精通劳动政策法律法规和劳动仲裁、诉讼程序,擅长劳动用工风险的有效预防与劳动争议案件的精准应对,善于把劳动法律法规与企业人力资源管理有机整合,通晓企业劳动争议防范机制的构建和劳动用工管理体系的修正完善。钟老师经常在客户办公现场、培训现场为客户、学员即时起草、审查、修改相关制度、合同、文书,或分析具体案件的应对思路;钟老师独到的现场的专业功底,每次都赢得广大客户、学员发自内心的好评与100%的信服!
科班出身的钟老师,曾任专职劳动仲裁员,曾获“广州市优秀劳动仲裁员”称号,期间审裁劳动争议案件400多宗;多年来累计代理劳动争议500多宗,参与或主持薪酬绩效咨询项目20多个,审查完善400多家企业的人力资源管理规章制度。个人长期担任30多家(累计200多家)企业的人力资源管理法律顾问;以钟老师领衔的专家队伍,长期为企事业单位提供劳动法常年顾问及各种劳资专项咨询服务,客户满意度高达95%。
2004年开始钟老师在全国各地巡讲劳动法、劳动关系课程,受益企业30000多家,直接受益学员80000多人,培训地点涉及30多个省会城市及沿海地区大城市。钟老师2010年授课102天,2011年授课123天,2012年授课130天,2013年授课133天,2014年授课(含已预约未讲授)135天,上述课程均为收费课程!过去5年,在劳动法课程授课天数、开课率方面,钟老师为华南地区第一位!数据说明一切,实力就在眼前!
钟老师将枯燥的劳动政策法规溶入实际管理案例当中,将人力资源管理与劳动法有机地整合在一起;课程内容80%为真实案例、20%为必备的重点法条;学员参与讨论、互动,课程生动有趣,深入浅出,实战型超强,让学员即时学以致用!课程满意度高达95%,众多学员均表示:“第一次听到如此实战、实用、实效的劳动法课程!钟老师非常务实、不说教、没有商业味道,终于听到了让我不再后悔的精彩课程!”
钟老师先后在《广州日报》、《南方都市报》、《中国社会科学报》、《人力资源》、《香港工业总会月刊》等报刊、杂志、媒体发表专业文章或采访稿50多篇。
详细 课程时间安排 及 联系方式 请查阅 附件内容
2017-9-25 13:46:13
4 years, 10 months
[RFC patch 4/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event
by Qi, Fuli
Notify.c is used to call the emulation of event of over threshold.
You can test nvdimm daemon with the following command.
notify [nmemX] [all]
Signed-off-by: QI Fuli <qi.fuli(a)jp.fujitsu.com>
---
nvdimmd/Makefile | 6 ++-
nvdimmd/notify.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 1 deletion(-)
diff --git a/nvdimmd/Makefile b/nvdimmd/Makefile
index df7eb46..9fb37ec 100644
--- a/nvdimmd/Makefile
+++ b/nvdimmd/Makefile
@@ -3,7 +3,7 @@ LIBS = -ludev -luuid -lkmod
DEST = /usr/bin
OBJS = ../ndctl/lib/.libs/libndctl.o ../daxctl/lib/.libs/libdaxctl.o ../util/.libs/sysfs.o ../util/.libs/log.o ../ndctl/lib/.libs/libndctl-smart.o
IDIR = -I../ -I../ndctl
-PROGRAM = nvdimmd
+PROGRAM = nvdimmd notify
all: $(PROGRAM)
nvdimmd: $(OBJS) nvdimmd.o libnvdimmd.o
@@ -12,6 +12,10 @@ libnvdimmd.o: libnvdimmd.c
$(CC) -o libnvdimmd.o $(IDIR) -c libnvdimmd.c
nvdimmd.o: nvdimmd.c
$(CC) -o nvdimmd.o $(IDIR) -c nvdimmd.c
+notify: $(OBJS) notify.o libnvdimmd.o
+ $(CC) $(OBJS) notify.o libnvdimmd.o $(LIBS) $(IDIR) -o notify
+notify.o: notify.c
+ $(CC) -o notify.o $(IDIR) -c notify.c
install: nvdimmd nvdimmd.service
install -s nvdimmd $(DEST)
cp nvdimmd.service /usr/lib/systemd/system/
diff --git a/nvdimmd/notify.c b/nvdimmd/notify.c
new file mode 100644
index 0000000..f83e60d
--- /dev/null
+++ b/nvdimmd/notify.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2017, FUJITSU LIMITED. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+ * more details.
+ */
+
+/*
+ * This program is used to call the emulation of event of over threshold.
+ * You can test nvdimmd daemon with the following command.
+ * notify [nmemX] [all]
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <ndctl/libndctl.h>
+#include "libnvdimmd.h"
+
+const char *notify_help_info = "notify [nmemX] [all]";
+
+static int notify_submit_cmd(threshold_dimm *t_dimm)
+{
+ struct ndctl_cmd *cmd;
+ const char *msg = "command to call over threshold event notification: ";
+
+ cmd = ndctl_dimm_cmd_new_smart_threshold(t_dimm->dimm);
+ if (!cmd) {
+ printf("failed to prepare %s[%s]\n", msg, t_dimm->devname);
+ return -1;
+ }
+ if(ndctl_cmd_submit(cmd)) {
+ printf("failed to submit %s[%s]\n", msg, t_dimm->devname);
+ return -1;
+ }
+ ndctl_cmd_unref(cmd);
+ return 0;
+}
+
+static int
+notify_submit(threshold_dimm *t_dimm, int count_dimm, char *notify_devname)
+{
+ int count_notify = 0;
+
+ for (int i= 0; i < count_dimm; i++) {
+ if (!strcmp(notify_devname, "all")) {
+ if (!notify_submit_cmd(&t_dimm[i]))
+ count_notify++;
+ continue;
+ }
+ if (!strcmp(notify_devname, t_dimm[i].devname)) {
+ if (!notify_submit_cmd(&t_dimm[i]))
+ count_notify++;
+ else
+ count_notify--;
+ break;
+ }
+ }
+ return count_notify;
+}
+
+int main(int argc, char *argv[])
+{
+ struct ndctl_ctx *ctx;
+ int rc, count_dimm;
+ char *notify_devname;
+ threshold_dimm *t_dimm;
+
+ if (argc < 1) {
+ printf("usage: %s\n", notify_help_info);
+ goto out;
+ }
+
+ notify_devname = argv[1];
+ if (!notify_devname || !strcmp(notify_devname, "--help")){
+ printf("usage: %s\n", notify_help_info);
+ goto out;
+ }
+ rc = ndctl_new(&ctx);
+ if (rc)
+ goto out;
+
+ t_dimm = calloc(NUM_MAX_DIMM, sizeof(threshold_dimm));
+ if (!t_dimm) {
+ printf("notify error: memory not allocate\n");
+ goto out;
+ }
+
+ count_dimm = get_threshold_dimm(ctx, t_dimm, NULL, NULL);
+ if (count_dimm == 0) {
+ printf("notify error: no dimm support over threshold notify\n");
+ goto out;
+ }
+
+ rc = notify_submit(t_dimm, count_dimm, notify_devname);
+
+ if (!rc && strcmp(notify_devname, "all"))
+ printf("UNKNOWM DIMM_NAME\n");
+ else if (rc >= 0)
+ printf("%d notify submit: [%s]\n", rc, notify_devname);
+
+ ndctl_unref(ctx);
+out:
+ return 1;
+}
--
QI Fuli <qi.fuli(a)jp.fujitsu.com>
4 years, 10 months
[RFC patch 2/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event
by Qi, Fuli
Nvdimmd.c is the body file of nvdimm daemon. Currently, it writes a log which includes
notified dimm's name and spare percentage.
Sign-off-by: QI Fuli <qi.fuli(a)jp.fujitsu.com>
---
nvdimmd/Makefile | 10 +++++-
nvdimmd/nvdimmd.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 106 insertions(+), 1 deletion(-)
diff --git a/nvdimmd/Makefile b/nvdimmd/Makefile
index a20a747..3908e5d 100644
--- a/nvdimmd/Makefile
+++ b/nvdimmd/Makefile
@@ -1,7 +1,15 @@
CC = gcc
+LIBS = -ludev -luuid -lkmod
+OBJS = ../ndctl/lib/.libs/libndctl.o ../daxctl/lib/.libs/libdaxctl.o ../util/.libs/sysfs.o ../util/.libs/log.o ../ndctl/lib/.libs/libndctl-smart.o
IDIR = -I../ -I../ndctl
+PROGRAM = nvdimmd
+all: $(PROGRAM)
+nvdimmd: $(OBJS) nvdimmd.o libnvdimmd.o
+ $(CC) $(OBJS) nvdimmd.o libnvdimmd.o $(LIBS) $(IDIR) -o nvdimmd
libnvdimmd.o: libnvdimmd.c
$(CC) -o libnvdimmd.o $(IDIR) -c libnvdimmd.c
+nvdimmd.o: nvdimmd.c
+ $(CC) -o nvdimmd.o $(IDIR) -c nvdimmd.c
clean:
- rm -rf *.o
+ rm -rf *.o $(PROGRAM)
diff --git a/nvdimmd/nvdimmd.c b/nvdimmd/nvdimmd.c
new file mode 100644
index 0000000..cdf78c8
--- /dev/null
+++ b/nvdimmd/nvdimmd.c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2017, FUJITSU LIMITED. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+ * more details.
+ */
+
+/*
+ * Nvdimm daemon is used to monitor the features of over threshold events.
+ * It automatically searches and monitors all of the dimms which support smart
+ * threshold. When an over threshold event fires, it will write a notification
+ * into the system log.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <ndctl/libndctl.h>
+#include "libnvdimmd.h"
+
+int wait_threshold_notify()
+{
+ struct ndctl_ctx *ctx;
+ int rc, maxfd, count_dimm;
+ threshold_dimm *t_dimm;
+
+ rc = ndctl_new(&ctx);
+ if (rc){
+ syslog(LOG_ERR, "nvdimmd error: failed to instantiate context");
+ goto out;
+ }
+
+ t_dimm = calloc(NUM_MAX_DIMM, sizeof(threshold_dimm));
+ if (!t_dimm) {
+ syslog(LOG_ERR, "nvdimmd error: t_dimm memory not allocated");
+ goto out_ctx;
+ }
+
+ fd_set fds;
+ FD_ZERO(&fds);
+
+ count_dimm = get_threshold_dimm(ctx, t_dimm, &fds, &maxfd);
+ if (count_dimm == 0) {
+ syslog(LOG_ERR,
+ "nvdimmd error: there is no dimm which supports over threshold notification");
+ goto out_tdimm;
+ }
+
+ rc = select(maxfd + 1, NULL, NULL, &fds, NULL);
+ if (rc < 1) {
+ if (rc == 0)
+ syslog(LOG_ERR, "nvdimmd error: select unexpected timeout");
+ else
+ syslog(LOG_ERR, "nvdimmd error: select %s", strerror(errno));
+ goto out_tdimm;
+ }
+
+ if (log_notify(t_dimm, count_dimm, fds, rc) == -1)
+ goto out_tdimm;
+
+ free(t_dimm);
+ ndctl_unref(ctx);
+ return 0;
+
+out_tdimm:
+ free(t_dimm);
+out_ctx:
+ ndctl_unref(ctx);
+out:
+ return 1;
+}
+
+int main()
+{
+ if (daemon(0, 0) != 0) {
+ syslog(LOG_ERR, "nvdimmd error: daemon start failed\n");
+ exit(EXIT_FAILURE);
+ }
+ syslog(LOG_NOTICE, "nvdimmd started\n");
+
+ int ret = 0;
+ while (ret == 0)
+ ret = wait_threshold_notify();
+
+ syslog(LOG_NOTICE, "nvdimmd ended\n");
+ return 0;
+}
--
QI Fuli <qi.fuli(a)jp.fujitsu.com>
4 years, 10 months
Segmentation fault when running "make M=tools/testing/nvdimm"
by Soccer Liu
Hi: As part of processing in setting up the environment for running unitests, I was able to work through the instrcutions in https://github.com/pmem/ndctl/tree/0a628fdf4fe58a283b16c1bbaa49bb28b1842bf9
all the way until I hit the followingbuild error (Segmentation fault) when buiding libnvdimm.o.Anyone hit this before?root@ubuntu:/home/soccerl/nvdimm# make M=tools/testing/nvdimm
AR tools/testing/nvdimm/built-in.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/core.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/bus.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/dimm_devs.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/dimm.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/region_devs.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/region.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/namespace_devs.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/label.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/claim.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/btt_devs.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/pfn_devs.o
CC [M] tools/testing/nvdimm/../../../drivers/nvdimm/dax_devs.o
CC [M] tools/testing/nvdimm/config_check.o
LD [M] tools/testing/nvdimm/libnvdimm.o
Segmentation fault
scripts/Makefile.build:548: recipe for target 'tools/testing/nvdimm/libnvdimm.o' failed
make[1]: *** [tools/testing/nvdimm/libnvdimm.o] Error 139
Makefile:1511: recipe for target '_module_tools/testing/nvdimm' failed
make: *** [_module_tools/testing/nvdimm] Error 2My devbox has 4.13 Linux in it.
I am not sure whether it has anything to do with fact that I didnt do anything with ndctl/ndctl.spec.in (because I am not sure how to apply those dependendies to my testbox) Thanks
Cheng-mean
4 years, 10 months
[PATCH v4 0/2] dax, dm: stop requiring dax for device-mapper
by Dan Williams
Changes since v3 [1]:
* rebase on 4.14-rc1
* rewrite the changelog of patch2 to drop broken references to the
"built-in portion of device-mapper" (Mike)
[1]: https://lists.01.org/pipermail/linux-nvdimm/2017-August/011545.html
---
Bart points out that the DAX core is unconditionally enabled if
device-mapper is enabled. Add some config machinery and stub routines to
allow device-mapper to build and run with CONFIG_DAX=n.
---
Dan Williams (2):
dax: introduce CONFIG_DAX_DRIVER
dm: allow device-mapper to operate without dax support
arch/powerpc/platforms/Kconfig | 1 +
drivers/block/Kconfig | 1 +
drivers/dax/Kconfig | 4 +++-
drivers/md/Kconfig | 2 +-
drivers/md/dm-linear.c | 6 ++++++
drivers/md/dm-stripe.c | 6 ++++++
drivers/md/dm.c | 10 ++++++----
drivers/nvdimm/Kconfig | 1 +
drivers/s390/block/Kconfig | 1 +
include/linux/dax.h | 30 ++++++++++++++++++++++++------
10 files changed, 50 insertions(+), 12 deletions(-)
4 years, 10 months
[GIT PULL] libnvdimm fixes for 4.14-rc2
by Williams, Dan J
Hi Linus, please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
...to receive a crash fix and corresponding regression test enabling
for the crash scenario. The unit test for this crash is available in
ndctl-v58.2. This branch has received a build success notification from
the 0day-kbuild robot over 148 configs. The fix is tagged for -stable /
backport to 4.13.
---
The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e:
Linux 4.14-rc1 (2017-09-16 15:47:51 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
for you to fetch changes up to 33a56086712561b8b9cdc881e0317f4c36861f72:
libnvdimm, namespace: fix btt claim class crash (2017-09-18 17:29:01 -0700)
----------------------------------------------------------------
Dan Williams (2):
tools/testing/nvdimm: disable labels for nfit_test.1
libnvdimm, namespace: fix btt claim class crash
drivers/nvdimm/namespace_devs.c | 9 +++++++++
tools/testing/nvdimm/test/nfit.c | 3 ---
2 files changed, 9 insertions(+), 3 deletions(-)
commit 5e75fe3927559505682b0053b5745e3f42d66e8c
Author: Dan Williams <dan.j.williams(a)intel.com>
Date: Mon Sep 18 17:19:10 2017 -0700
tools/testing/nvdimm: disable labels for nfit_test.1
Improve coverage of NVDIMM-N test scenarios by providing a test bus
incapable of label operations.
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
commit 33a56086712561b8b9cdc881e0317f4c36861f72
Author: Dan Williams <dan.j.williams(a)intel.com>
Date: Mon Sep 18 14:48:58 2017 -0700
libnvdimm, namespace: fix btt claim class crash
Maurice reports:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
IP: holder_class_store+0x253/0x2b0 [libnvdimm]
...while trying to reconfigure an NVDIMM-N namespace into 'sector' /
'btt' mode. The crash points to this line:
(gdb) li *(holder_class_store+0x253)
0x7773 is in holder_class_store (drivers/nvdimm/namespace_devs.c:1420).
1415 for (i = 0; i < nd_region->ndr_mappings; i++) {
1416 struct nd_mapping *nd_mapping = &nd_region->mapping[i];
1417 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
1418 struct nd_namespace_index *nsindex;
1419
1420 nsindex = to_namespace_index(ndd, ndd->ns_current);
...where we are failing because ndd is NULL due to NVDIMM-N dimms not
supporting labels.
Long story short, default to the BTTv1 format in the label-less /
NVDIMM-N case.
Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format")
Cc: <stable(a)vger.kernel.org>
Cc: Vishal Verma <vishal.l.verma(a)intel.com>
Reported-by: Maurice A. Saldivar <maurice.a.saldivar(a)hpe.com>
Tested-by: Maurice A. Saldivar <maurice.a.saldivar(a)hpe.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
4 years, 10 months
FIle copy to FAT FS on NVDIMM hits BUG_ON at fs/buffer.c:3305!
by Kani, Toshimitsu
Hi,
Copying files to vfat FS on an NVDIMM device hits
BUG_ON(!PageLocked(page)) in try_to_free_buffers(). It happens on
4.13-rc1, and happens on older kernels as well.
A simple reproducer is shown below. It is 100% reproducible on my
setup (8GB of regular memory and 16GB of NVDIMM). It usually hits in
the 3rd or 4th file copy and does not repeat with the while-loop.
Interestingly, it hits only when an NVDIMM device is set as raw or
memory mode. It does not hit with sector mode.
==
DEV=pmem0
set -x
mkfs.vfat /dev/$DEV
mount /dev/$DEV /mnt/$DEV
dd if=/dev/zero of=/mnt/$DEV/1Gfile bs=1M count=1024
while true; do
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-1
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-2
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-3
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-4
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-5
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-6
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-7
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-8
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-9
cp /mnt/$DEV/1Gfile /mnt/$DEV/file-10
done
==
kernel BUG at fs/buffer.c:3305!
invalid opcode: 0000 [#1] SMP
:
Workqueue: writeback wb_workfn (flush-259:0)
task: ffff8d02595b8000 task.stack: ffffa22242400000
RIP: 0010:try_to_free_buffers+0xd2/0xe0
RSP: 0018:ffffa22242403830 EFLAGS: 00010246
RAX: 00afffc000001028 RBX: 0000000000000008 RCX: ffff8d012dcf19c0
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffc468e3b52b80
RBP: ffffa22242403858 R08: 0000000000000000 R09: 000000000002067c
R10: ffff8d027ffe6000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8d022fccdbe0 R14: ffffc468e3b52b80 R15: ffffa22242403ad0
FS: 0000000000000000(0000) GS:ffff8d027fd40000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9d2bb80b70 CR3: 000000084fe09000 CR4: 00000000007406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
clean_buffers+0x5d/0x70
__mpage_writepage+0x567/0x760
? page_mkclean+0x6a/0xb0
write_cache_pages+0x205/0x580
? clean_buffers+0x70/0x70
? fat_add_cluster+0x80/0x80 [fat]
mpage_writepages+0x7c/0x100
? fat_add_cluster+0x80/0x80 [fat]
? __set_page_dirty+0x9b/0xc0
? fprop_fraction_percpu+0x2f/0x80
fat_writepages+0x15/0x20 [fat]
? fat_writepages+0x15/0x20 [fat]
do_writepages+0x25/0x80
__writeback_single_inode+0x45/0x350
writeback_sb_inodes+0x25e/0x610
__writeback_inodes_wb+0x92/0xc0
wb_writeback+0x29b/0x340
wb_workfn+0x195/0x3d0
? wb_workfn+0x195/0x3d0
process_one_work+0x193/0x3d0
worker_thread+0x4e/0x3d0
kthread+0x114/0x150
? process_one_work+0x3d0/0x3d0
? kthread_park+0x60/0x60
? kthread_park+0x60/0x60
ret_from_fork+0x25/0x30
:
RIP: try_to_free_buffers+0xd2/0xe0 RSP: ffffa22242403830
Thanks,
-Toshi
4 years, 10 months